Ejemplo n.º 1
0
        /// <summary>
        /// Selects the component's scene object and focuses on the specific field in the inspector, if the inspector
        /// window is open.
        /// </summary>
        private void FocusOnField()
        {
            SceneObject so = obj.SceneObject;

            if (so != null)
            {
                if (Selection.SceneObject != so)
                {
                    Selection.SceneObject = so;
                }

                if (!string.IsNullOrEmpty(fieldPath))
                {
                    InspectorWindow inspectorWindow = EditorWindow.GetWindow <InspectorWindow>();
                    inspectorWindow?.FocusOnField(obj.UUID, fieldPath);
                }
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Updates the values of the fields displayed in the inspector window.
        /// </summary>
        private void RefreshInspector()
        {
            InspectorWindow inspectorWindow = EditorWindow.GetWindow <InspectorWindow>();

            inspectorWindow?.RefreshComponentFields(obj);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Updates the values of the fields displayed in the inspector window.
        /// </summary>
        private void RefreshInspector()
        {
            InspectorWindow inspectorWindow = EditorWindow.GetWindow <InspectorWindow>();

            inspectorWindow?.RefreshSceneObjectFields(true);
        }