update CCK to 3.10, fixing unity 2021 crash :)

This commit is contained in:
Crispy 2024-08-03 22:24:42 +02:00
parent 48a978fa2a
commit d11e0fb3a9
492 changed files with 2165204 additions and 437687 deletions

View file

@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using ABI.CCK.Components;
using ABI.CCK.Scripts.Editor;
using UnityEditor;
using UnityEditorInternal;
using UnityEngine;
@ -59,8 +60,8 @@ namespace ABI.CCK.Scripts.Editor
private void OnDrawHeaderCategory(Rect rect)
{
Rect _rect = new Rect(rect.x, rect.y, rect.width, EditorGUIUtility.singleLineHeight);
GUI.Label(_rect, "Categories");
EditorGUIExtensions.UtilityMenu(_rect, CategoryList);
}
private void OnDrawElementCategory(Rect rect, int index, bool isactive, bool isfocused)
@ -84,7 +85,7 @@ namespace ABI.CCK.Scripts.Editor
_rect.x += 50;
_rect.width = rect.width - 50 - 50;
objectCatalogCategory.image = (Texture2D) EditorGUI.ObjectField(_rect, objectCatalogCategory.image, typeof(Texture2D));
objectCatalogCategory.image = EditorGUI.ObjectField(_rect, objectCatalogCategory.image, typeof(Texture2D), false) as Texture2D;
if (objectCatalogCategory.image != null)
{
@ -117,8 +118,8 @@ namespace ABI.CCK.Scripts.Editor
private void OnDrawHeaderEntry(Rect rect)
{
Rect _rect = new Rect(rect.x, rect.y, rect.width, EditorGUIUtility.singleLineHeight);
GUI.Label(_rect, "Objects");
EditorGUIExtensions.UtilityMenu(_rect, objectCatalogList);
}
private void OnDrawElementEntry(Rect rect, int index, bool isactive, bool isfocused)
@ -156,7 +157,7 @@ namespace ABI.CCK.Scripts.Editor
_rect.x += 60;
_rect.width = rect.width - 160;
objectCatalogEntry.prefab = (GameObject) EditorGUI.ObjectField(_rect, objectCatalogEntry.prefab, typeof(GameObject));
objectCatalogEntry.prefab = EditorGUI.ObjectField(_rect, objectCatalogEntry.prefab, typeof(GameObject), false) as GameObject;
if (objectCatalogEntry.prefab != null)
{
@ -184,7 +185,7 @@ namespace ABI.CCK.Scripts.Editor
_rect.x += 60;
_rect.width = rect.width - 160;
objectCatalogEntry.preview = (Texture2D) EditorGUI.ObjectField(_rect, objectCatalogEntry.preview, typeof(Texture2D));
objectCatalogEntry.preview = EditorGUI.ObjectField(_rect, objectCatalogEntry.preview, typeof(Texture2D), false) as Texture2D;
rect.y += EditorGUIUtility.singleLineHeight * 1.25f;
_rect = new Rect(rect.x, rect.y, rect.width, EditorGUIUtility.singleLineHeight);