Example #1
0
        internal static void SavePrefab(ref int instanceID)
        {
            var gitem = EditorUtility.InstanceIDToObject(instanceID);

            if (gitem != null)
            {
                ActionEditorUtility.ApplyPrefab(gitem as GameObject);
                GameObject.DestroyImmediate(gitem);
            }
            instanceID = 0;
        }
Example #2
0
        internal static void SavePrefab(SerializedProperty instanceIDProp, bool ignoreTranform)
        {
            var gitem = EditorUtility.InstanceIDToObject(instanceIDProp.intValue);

            if (gitem != null)
            {
                if (!ignoreTranform || !Ignore(gitem))
                {
                    ActionEditorUtility.ApplyPrefab(gitem as GameObject);
                }
                GameObject.DestroyImmediate(gitem);
            }
            instanceIDProp.intValue = 0;
        }
Example #3
0
        internal static void SavePrefab(SerializedProperty instanceIDProp, SerializedProperty coordinate)
        {
            var gitem = EditorUtility.InstanceIDToObject(instanceIDProp.intValue);

            if (gitem != null)
            {
                var transform = (gitem as GameObject).transform;
                ActionEditorUtility.SaveCoordinatesInfo(coordinate, transform);
                if (!Ignore(gitem))
                {
                    ActionEditorUtility.ApplyPrefab(gitem as GameObject);
                }
                GameObject.DestroyImmediate(gitem);
            }
            instanceIDProp.intValue = 0;
        }