自动保存预制体

ca88会员登录中心
using System.Collections;using System.Collections.Generic;using UnityEngine;using UnityEditor;// 自动保存预制体public class NewBehaviourScript : MonoBehaviour{ // Use this for initialization [InitializeOnLoadMethod] static void Start() { PrefabUtility.prefabInstanceUpdated = delegate { GameObject go = null; if (null != Selection.activeTransform) go = Selection.activeGameObject; AssetDatabase.SaveAssets(); if (null != go) { EditorApplication.delayCall = delegate { Selection.activeGameObject = go; }; } }; }}

发表评论

电子邮件地址不会被公开。 必填项已用*标注

网站地图xml地图