Hi there,
I’m trying to use python with Unity, the setup is fine and I was able to execute some script on Unity, but actually i’m trying to execute a simple code, that will look for a GameObject and assign to its child a color
import UnityEngine as ue
go = ue.GameObject.FindGameObjectWithTag("CubesManager")
if go:
meshRenders = go.GetComponentsInChildren<ue.Renderer>()
#if len(meshRenders) > 0:
# for ren in meshRenders:
# ren.material.color = ue.Color(1, 0, 0)
But i keep receiving the following error PythonException: TypeError : ‘bool’ object is not iterable
Does anyone know how to solve this issue ? Is python not recognizing that the function return a list/tuple ?
I tried also the following line but same thing
meshRenders = go.GetComponentsInChildren<ue.Renderer>()
Any help would be appreciated
Thanks