multiple xr toolkit package
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

VRC_ObjectSyncEditor.cs 893B

1234567891011121314151617
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEditor;
  4. using UnityEngine;
  5. [CustomEditor(typeof(VRCSDK2.VRC_ObjectSync))]
  6. public class VRC_ObjectSyncEditor : Editor {
  7. public override void OnInspectorGUI()
  8. {
  9. VRCSDK2.VRC_ObjectSync c = ((VRCSDK2.VRC_ObjectSync)target);
  10. if ((c.gameObject.GetComponent<Animator>() != null || c.gameObject.GetComponent<Animation>() != null) && c.SynchronizePhysics)
  11. EditorGUILayout.HelpBox("If the Animator or Animation moves the root position of this object then it will conflict with physics synchronization.", MessageType.Warning);
  12. if (c.GetComponent<VRCSDK2.VRC_DataStorage>() != null && c.SynchronizePhysics)
  13. EditorGUILayout.HelpBox("Consider either removing the VRC_DataStorage or disabling SynchronizePhysics.", MessageType.Warning);
  14. DrawDefaultInspector();
  15. }
  16. }