Hello, everybody! I have already read how to assign a prefab to a GameObject, but I need to assign an existing a prefab to a custom variable
I use Kinect to interact with an avatar. Kinect interface I downloaded here
has a class SkeletonWrapper. I also can declare the variable of type SkeletonWrapper (sw) in an other class, so sw is to see in inspector. Now I want to assign a “Kinect_Prefab” (which is also included in Kinect interface and controls skeleton tracking) to sw per Script. I do it like that: sw = Instantiate(Resources.Load(“Kinect_Prefab”)) and sw of course needs to be a GameObject, but sw is a SkeletonWrapper variable and I cannot cast it to a GO. I already tried it and an InvalidCastException comes out. Any ideas? I would appreciate even a hint! Thanks in advance!