public override void OnInspectorGUI() { VNetTransform me = (target as VNetTransform); GUIStyle style = new GUIStyle(GUI.skin.button); style.normal.textColor = Color.red; if (me.netIdentifier == 0 && GUILayout.Button("Generate Net UID", style)) { me.netIdentifier = VNetUtils.GenerateUIDInEditor(); } if (me.isLocalControlled == false && me.isRemoteControlled == false && GUILayout.Button("Take Local Control")) { me.TakeLocalControl(); } if (me.isLocalControlled && GUILayout.Button("Revoke Local Control")) { me.RevokeLocalControl(); } base.OnInspectorGUI(); }
public override void OnInspectorGUI() { VNetSpawnPrefab me = (target as VNetSpawnPrefab); GUIStyle style = new GUIStyle(GUI.skin.button); style.normal.textColor = Color.red; if (me.netIdentifier == 0 && GUILayout.Button("Generate Net UID", style)) { me.netIdentifier = VNetUtils.GenerateUIDInEditor(); } base.OnInspectorGUI(); }