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

syncRotationAxis can't be set from script

$
0
0
I was trying to set syncRotationAxis through script while inside editor. I am doing this in a usual way:
Code (CSharp):
  1. go.GetComponent<NetworkTransform>().syncRotationAxis = NetworkTransform.AxisSyncMode.AxisY;
However, it bounces back and resets to XYZ. I am doing this on a prefab GameObject after calling
Code (CSharp):
  1. UnityEditor.AssetDatabase.LoadAssetAtPath<GameObject>("Assets/myNetPrefab.prefab")
which loads previously saved prefab. NetworkTransform component is being added...

syncRotationAxis can't be set from 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>