Beispiel #1
0
 private static void FileModeChanged(string[] assets, UnityEditor.VersionControl.FileMode mode)
 {
     if (Provider.enabled && Provider.PromptAndCheckoutIfNeeded(assets, string.Empty))
     {
         Provider.SetFileMode(assets, mode);
     }
 }
 static void FileModeChanged(string[] assets, UnityEditor.VersionControl.FileMode mode)
 {
     // Make sure that all assets are checked out in version control and
     // that we have the most recent status
     if (Provider.enabled)
     {
         if (Provider.PromptAndCheckoutIfNeeded(assets, ""))
         {
             Provider.SetFileMode(assets, mode);
         }
     }
 }
Beispiel #3
0
        // ReSharper disable once UnusedMember.Local - invoked from native code
        static void FileModeChanged(string[] assets, UnityEditor.VersionControl.FileMode mode)
        {
            if (!Provider.enabled)
            {
                return;
            }

            // we'll want to re-serialize these assets in different (text vs binary) mode;
            // make sure they are editable first
            AssetDatabase.MakeEditable(assets);
            Provider.SetFileMode(assets, mode);
        }
Beispiel #4
0
 static void FileModeChanged(string[] assets, UnityEditor.VersionControl.FileMode mode)
 {
     // Make sure that all assets are checked out in version control and
     // that we have the most recent status
     if (Provider.enabled)
     {
         var editableAssets = new string[assets.Length];
         if (Provider.MakeEditable(assets, editableAssets))
         {
             // TODO: handle partial results from MakeEditable i.e. editableassets
             Provider.SetFileMode(assets, mode);
         }
     }
 }
        // ReSharper disable once UnusedMember.Local - invoked from native code
        static void FileModeChanged(string[] assets, UnityEditor.VersionControl.FileMode mode)
        {
            if (!Provider.enabled)
            {
                return;
            }

            // if we happen to be disconnected or work offline, there's not much we can do;
            // just ignore the file mode and hope that VCS client/project is setup to handle
            // appropriate file types correctly
            if (!Provider.isActive)
            {
                return;
            }

            // we'll want to re-serialize these assets in different (text vs binary) mode;
            // make sure they are editable first
            AssetDatabase.MakeEditable(assets);
            Provider.SetFileMode(assets, mode);
        }