Beispiel #1
0
        public override void OnInspectorGUI()
        {
            MeshCombiner targetObject = (MeshCombiner)target;

            serializedObject.Update();
            InspectorCombine(targetObject);
            serializedObject.ApplyModifiedProperties();
        }
Beispiel #2
0
        private void InspectorCombine(MeshCombiner targetObject)
        {
            EditorGUILayout.PropertyField(serializedObjectToCombine);
            EditorGUILayout.PropertyField(serializedMaterialToUse);
            EditorGUILayout.PropertyField(serializedOldObjectSetting);
            EditorGUILayout.PropertyField(serializedIncludeParent);
            EditorGUILayout.PropertyField(serializedMergeSubMeshes);
            EditorGUILayout.PropertyField(serializedIncludeTransformMatrices);
            EditorGUILayout.PropertyField(serializedIncludeLightMapData);
            EditorGUILayout.PropertyField(serializedColliderToAdd);
            if (GUILayout.Button("Combine Current Object"))
            {
                if (serializedObjectToCombine == null)
                {
                    Debug.LogError("Combine object is null");
                    return;
                }

                targetObject.Combine();
            }
        }