mirror of
https://github.com/PorktoberRevolution/ReStocked
synced 2024-09-01 17:34:42 +00:00
Fix transform finder
* It was using node.name rather than node.value * Wasn't actually adding the renderers it found to the result
This commit is contained in:
parent
eb4a4e621c
commit
edc42d3360
Binary file not shown.
@ -70,7 +70,7 @@ namespace Restock
|
||||
{
|
||||
if (value.name == "transform")
|
||||
{
|
||||
Transform[] modelTransforms = part.FindModelTransforms(value.name);
|
||||
Transform[] modelTransforms = part.FindModelTransforms(value.value);
|
||||
|
||||
if (modelTransforms.Length == 0)
|
||||
{
|
||||
@ -89,12 +89,12 @@ namespace Restock
|
||||
transformRenderers.Add(renderer);
|
||||
}
|
||||
|
||||
renderers.Concat(transformRenderers);
|
||||
renderers = renderers.Concat(transformRenderers);
|
||||
useAllRenderers = false;
|
||||
}
|
||||
else if (value.name == "baseTransform")
|
||||
{
|
||||
Transform[] modelTransforms = part.FindModelTransforms(value.name);
|
||||
Transform[] modelTransforms = part.FindModelTransforms(value.value);
|
||||
|
||||
if (modelTransforms.Length == 0)
|
||||
{
|
||||
@ -109,7 +109,7 @@ namespace Restock
|
||||
if (transformRenderers.Length == 0)
|
||||
this.LogError($"No renderers found on transform '{transform.name}' or its children");
|
||||
else
|
||||
renderers.Concat(transform.GetComponentsInChildren<Renderer>());
|
||||
renderers = renderers.Concat(transform.GetComponentsInChildren<Renderer>());
|
||||
}
|
||||
|
||||
useAllRenderers = false;
|
||||
|
Loading…
Reference in New Issue
Block a user