常用方法
常用方法
常用方法
常用方法
internal static void ApplyPrefabObjectOverride(object userData) { ObjectInstanceAndSourcePathInfo info = (ObjectInstanceAndSourcePathInfo)userData; if (!PrefabUtility.PromptAndCheckoutPrefabIfNeeded(info.assetPath, PrefabUtility.SaveVerb.Apply)) { return; } PrefabUtility.ApplyObjectOverride(info.instanceObject, info.assetPath, InteractionMode.UserAction); EditorUtility.ForceReloadInspectors(); }