update CCK to 3.10, fixing unity 2021 crash :)
This commit is contained in:
parent
48a978fa2a
commit
d11e0fb3a9
492 changed files with 2165204 additions and 437687 deletions
69
Assets/ABI.CCK/Scripts/Editor/CCK_Utilities.cs
Executable file
69
Assets/ABI.CCK/Scripts/Editor/CCK_Utilities.cs
Executable file
|
@ -0,0 +1,69 @@
|
|||
using System.IO;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace ABI.CCK.Scripts.Editor
|
||||
{
|
||||
public static class CCK_Utilities
|
||||
{
|
||||
#region Gizmo Icons
|
||||
|
||||
[MenuItem("Alpha Blend Interactive/Utilities/Gizmo Icons/Show All", false, 250)]
|
||||
private static void ShowAllGizmos() => CCK_GizmoFix.SetGizmoIcons(true);
|
||||
|
||||
[MenuItem("Alpha Blend Interactive/Utilities/Gizmo Icons/Hide All", false, 250)]
|
||||
private static void HideAllGizmos() => CCK_GizmoFix.SetGizmoIcons(false);
|
||||
|
||||
#endregion
|
||||
|
||||
#region Layer Names
|
||||
|
||||
[MenuItem("Alpha Blend Interactive/Utilities/Reset Layer Names", false, 260)]
|
||||
private static void ForceResetTagManager()
|
||||
{
|
||||
bool proceed = EditorUtility.DisplayDialog(
|
||||
"CCK :: Reset Layer Names",
|
||||
"Are you sure you want to reset all layer names? This will reset all custom layer names to the CCK defaults.",
|
||||
"Yes",
|
||||
"No");
|
||||
|
||||
if (!proceed)
|
||||
return;
|
||||
|
||||
CCK_Init.ResetTagManager(true);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Debugging
|
||||
|
||||
// Debugging if GUI blows tf up on import (this forces recompiling scripts)
|
||||
private static readonly string _tempFile = Path.Combine(Application.dataPath, "ABI.CCK", "dummy.cs");
|
||||
[MenuItem("Alpha Blend Interactive/Utilities/Refresh CCK", false, 9999)]
|
||||
public static void RefreshCCK()
|
||||
{
|
||||
try
|
||||
{
|
||||
if (File.Exists(_tempFile))
|
||||
{
|
||||
File.Delete(_tempFile);
|
||||
string metaFile = _tempFile + ".meta";
|
||||
if (File.Exists(metaFile))
|
||||
File.Delete(metaFile);
|
||||
}
|
||||
else
|
||||
{
|
||||
File.Create(_tempFile).Close();
|
||||
}
|
||||
|
||||
AssetDatabase.Refresh();
|
||||
}
|
||||
catch (IOException ex)
|
||||
{
|
||||
Debug.LogError("Error refreshing CCK: " + ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue