Get child object error


(Alex) #1

Hello everyone, I encountered such an error.
I’m just trying to take the child object from the parent object, but Unity gives an error (in the screenshot). The child object exists, I checked, but the error is still there.


(Leslie Young) #2

Follow these instructions when posting about console messages When Reporting Errors

It is much more useful when you post the complete message as text here rather than posting a screenshot since I can then track down where exactly in the code the error is being triggered.

As for error message. You will get it when you are trying to get a child object that does not exist in the target object.


(Alex) #3

UnityException: Transform child out of bounds
plyBloxKit.GetObjectChild_plyBlock.Run (BlockReturn param) (at D:/Work/u50/SOURCE/plyBlox/Blocks/Object/Object/GetObjectChild_plyBlock.cs:41)
plyBloxKit.GameObject_Value.RunAndGetGameObject () (at D:/Work/u50/SOURCE/plyBlox/Blocks/Common/Value/GameObject_Value.cs:24)
plyBloxKit.SetObjectParent_plyBlock.Run (BlockReturn param) (at D:/Work/u50/SOURCE/plyBlox/Blocks/Object/Object/SetObjectParent_plyBlock.cs:32)
plyBloxKit.plyEvent.Run () (at D:/Work/u50/SOURCE/plyBlox/plyEvent.cs:78)
plyBloxKit.plyBlox.RunEvent (plyBloxKit.plyEvent ev) (at D:/Work/u50/SOURCE/plyBlox/plyBlox.cs:643)
plyBloxKit.plyBlox.Update () (at D:/Work/u50/SOURCE/plyBlox/plyBlox.cs:325)


(Leslie Young) #4

I meant for “future reference”. Thanks for posting full message anyway :wink:

Like I said. This is an error Unity throw when there is no child object. It is not an error with the Block.
Make sure there really is a child object. This child object you are trying to access, do you create, destroy it at any time during runtime for example? If so then you could be getting the timing wrong in your Blox and the child is not actually there while you think it might be.