Initial commit

This commit is contained in:
2026-03-03 00:39:30 +05:00
commit fc01f07d9b
29933 changed files with 5353098 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
using UnityEngine;
using UnityEditor;
using UnityEditor.UI;
namespace Unity.UI.Shaders.Sample.Editor
{
[CustomEditor(typeof(CustomToggle))]
public class CustomToggleEditor : ToggleEditor
{
SerializedProperty m_OnStateChangedProperty;
protected override void OnEnable()
{
base.OnEnable();
m_OnStateChangedProperty = serializedObject.FindProperty("onStateChanged");
}
public override void OnInspectorGUI()
{
base.OnInspectorGUI();
EditorGUILayout.Space();
EditorGUILayout.PropertyField(m_OnStateChangedProperty);
serializedObject.ApplyModifiedProperties();
}
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 1ab1c9b915235414cb5fc563370fcddf

View File

@@ -0,0 +1,31 @@
using UnityEngine;
using UnityEditor;
namespace Unity.UI.Shaders.Sample.Editor
{
[CustomPropertyDrawer(typeof(MinMaxSliderAttribute))]
public class MinMaxSliderDrawer : PropertyDrawer
{
MinMaxSliderAttribute range => (MinMaxSliderAttribute)attribute;
Vector2 _value;
public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
{
if (property.propertyType == SerializedPropertyType.Vector2)
{
_value = property.vector2Value;
EditorGUI.BeginChangeCheck();
EditorGUI.MinMaxSlider(position, label, ref _value.x, ref _value.y, range.min, range.max);
if (EditorGUI.EndChangeCheck())
{
property.vector2Value = _value;
}
}
else
{
EditorGUI.PropertyField(position, property, label);
}
}
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 173897d9cfd2ff445912c20f991e22e8

View File

@@ -0,0 +1,18 @@
using UnityEditor;
using UnityEngine;
using TMPro;
namespace Unity.UI.Shaders.Sample.Editor
{
public static class TMProResourcesCheck
{
[InitializeOnLoadMethod]
static void Init()
{
var tmProSettings = TMP_Settings.instance; // getting the instance should be enough
//var tmProStettings = Resources.Load<TMP_Settings>("TMP Settings");
//if (tmProStettings == null)
// TMP_PackageResourceImporterWindow.ShowPackageImporterWindow();
}
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: e9ec04bf20ec56e4ea9b5ee986bfe9e8

View File

@@ -0,0 +1,30 @@
{
"name": "Unity.UI.Shaders.Sample.Editor",
"rootNamespace": "Unity.UI.Shaders.Sample.Editor",
"references": [
"GUID:2bafac87e7f4b9b418d9448d219b01ab",
"GUID:343deaaf83e0cee4ca978e7df0b80d21",
"GUID:6055be8ebefd69e48b49212b09b47b2f",
"GUID:6546d7765b4165b40850b3667f981c26",
"GUID:b3f345a8790ef4c419a5d3ea60e9f97d"
],
"includePlatforms": [
"Editor"
],
"excludePlatforms": [],
"allowUnsafeCode": false,
"overrideReferences": false,
"precompiledReferences": [],
"autoReferenced": true,
"defineConstraints": [
"UGUI"
],
"versionDefines": [
{
"name": "com.unity.ugui",
"expression": "",
"define": "UGUI"
}
],
"noEngineReferences": false
}

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 7a3378c8f903ad844b18cfbbba053b88
AssemblyDefinitionImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant: