Quantcast
Channel: Multiplayer
Viewing all articles
Browse latest Browse all 16796

UNET add NetworkTransformChild through script

$
0
0
Hello there!

I am wondering can I add NetworkTransformChild component to my game object by script? I have child object that is generated for parent on the fly, when I try to do this, more specifically

Code (CSharp):
  1. var childT = this.AddComponent<NetworkTransformChild>();
  2. childT.target = ...

the line 134(if I remember correctly) in the Awake function call in NetworkTransformChild.cs, throws NullPointException.

This is expected if NetworkTransformChild.cs use the target field in the...

UNET add NetworkTransformChild through script

Viewing all articles
Browse latest Browse all 16796

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>