Exemplo n.º 1
0
        internal static void ApplyPrefabPropertyOverride(object userData)
        {
            PropertyAndSourcePathInfo info = (PropertyAndSourcePathInfo)userData;

            if (!PrefabUtility.PromptAndCheckoutPrefabIfNeeded(info.assetPath, PrefabUtility.SaveVerb.Apply))
            {
                return;
            }
            for (int i = 0; i < info.properties.Length; i++)
            {
                PrefabUtility.ApplyPropertyOverride(info.properties[i], info.assetPath, InteractionMode.UserAction);
            }
            EditorUtility.ForceReloadInspectors();
        }