新增unity的牛逼shader和熊猫超级shader
This commit is contained in:
1 parent
6001f6d87a
commit
1a4cd29e7c
216 files changed
+41947
No files matched your search
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$/.." vcs="Git" />
|
||||
</component>
|
||||
</project>
|
||||
@@ -0,0 +1,55 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="AutoImportSettings">
|
||||
<option name="autoReloadType" value="SELECTIVE" />
|
||||
</component>
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="91023a6b-e90c-4b7e-ad29-2c758b62337b" name="更改" comment="" />
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
||||
<option name="LAST_RESOLUTION" value="IGNORE" />
|
||||
</component>
|
||||
<component name="Git.Settings">
|
||||
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$/.." />
|
||||
</component>
|
||||
<component name="ProjectColorInfo"><![CDATA[{
|
||||
"associatedIndex": 1
|
||||
}]]></component>
|
||||
<component name="ProjectId" id="2woZni0kkDvAva6vMvSRxXle59k" />
|
||||
<component name="ProjectViewState">
|
||||
<option name="hideEmptyMiddlePackages" value="true" />
|
||||
<option name="showLibraryContents" value="true" />
|
||||
</component>
|
||||
<component name="PropertiesComponent"><![CDATA[{
|
||||
"keyToString": {
|
||||
"RunOnceActivity.ShowReadmeOnStart": "true",
|
||||
"git-widget-placeholder": "main",
|
||||
"node.js.detected.package.eslint": "true",
|
||||
"node.js.detected.package.tslint": "true",
|
||||
"node.js.selected.package.eslint": "(autodetect)",
|
||||
"node.js.selected.package.tslint": "(autodetect)",
|
||||
"nodejs_package_manager_path": "npm",
|
||||
"vue.rearranger.settings.migration": "true"
|
||||
}
|
||||
}]]></component>
|
||||
<component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="应用程序级" UseSingleDictionary="true" transferred="true" />
|
||||
<component name="TaskManager">
|
||||
<task active="true" id="Default" summary="默认任务">
|
||||
<changelist id="91023a6b-e90c-4b7e-ad29-2c758b62337b" name="更改" comment="" />
|
||||
<created>1746710058620</created>
|
||||
<option name="number" value="Default" />
|
||||
<option name="presentableId" value="Default" />
|
||||
<updated>1746710058620</updated>
|
||||
<workItem from="1746710064595" duration="3599000" />
|
||||
</task>
|
||||
<servers />
|
||||
</component>
|
||||
<component name="TypeScriptGeneratedFilesManager">
|
||||
<option name="version" value="3" />
|
||||
</component>
|
||||
<component name="UnityProjectConfiguration" hasMinimizedUI="false" />
|
||||
<component name="VcsManagerConfiguration">
|
||||
<option name="CLEAR_INITIAL_COMMIT_MESSAGE" value="true" />
|
||||
</component>
|
||||
</project>
|
||||
@@ -0,0 +1,146 @@
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
[CustomEditor(typeof(AnimationSheetHelper))]
|
||||
public class AnimationSheetHelperEditor : Editor
|
||||
{
|
||||
SerializedProperty isParticleBaseShader;
|
||||
SerializedProperty isPostProcessShader;
|
||||
SerializedProperty postProcessingController;
|
||||
SerializedProperty propertyName;
|
||||
|
||||
SerializedProperty xSize;
|
||||
SerializedProperty ySize;
|
||||
|
||||
SerializedProperty manualPlay;
|
||||
SerializedProperty manualPlayePos;
|
||||
SerializedProperty speed;
|
||||
|
||||
SerializedProperty scaleOffset;
|
||||
SerializedProperty mat;
|
||||
SerializedProperty frameIndex;
|
||||
SerializedProperty frameCount;
|
||||
|
||||
private AnimationSheetHelper _target;
|
||||
|
||||
void OnEnable()
|
||||
{
|
||||
_target = (AnimationSheetHelper)target;
|
||||
|
||||
isParticleBaseShader = serializedObject.FindProperty("isParticleBaseShader");
|
||||
// isPostProcessShader = serializedObject.FindProperty("isPostProcessShader");
|
||||
// postProcessingController = serializedObject.FindProperty("postProcessingController");
|
||||
propertyName = serializedObject.FindProperty("propertyName");
|
||||
|
||||
xSize = serializedObject.FindProperty("xSize");
|
||||
ySize = serializedObject.FindProperty("ySize");
|
||||
|
||||
manualPlay = serializedObject.FindProperty("manualPlay");
|
||||
manualPlayePos = serializedObject.FindProperty("manualPlayePos");
|
||||
speed = serializedObject.FindProperty("speed");
|
||||
|
||||
scaleOffset = serializedObject.FindProperty("scaleOffset");
|
||||
mat = serializedObject.FindProperty("mat");
|
||||
frameIndex = serializedObject.FindProperty("frameIndex");
|
||||
frameCount = serializedObject.FindProperty("frameCount");
|
||||
}
|
||||
|
||||
public override void OnInspectorGUI()
|
||||
{
|
||||
serializedObject.Update();
|
||||
|
||||
DrawShaderSection();
|
||||
EditorGUILayout.Space(5);
|
||||
DrawAnimationSection();
|
||||
EditorGUILayout.Space(5);
|
||||
DrawRuntimeInfo();
|
||||
EditorGUILayout.Space(8);
|
||||
DrawInitButton();
|
||||
|
||||
serializedObject.ApplyModifiedProperties();
|
||||
}
|
||||
|
||||
#region Sections
|
||||
|
||||
void DrawShaderSection()
|
||||
{
|
||||
EditorGUILayout.LabelField("Shader 设置", EditorStyles.boldLabel);
|
||||
|
||||
EditorGUI.BeginChangeCheck();
|
||||
EditorGUILayout.PropertyField(isParticleBaseShader, new GUIContent("使用 NB Shader"));
|
||||
if (EditorGUI.EndChangeCheck())
|
||||
{
|
||||
serializedObject.ApplyModifiedProperties();
|
||||
_target.InitParticleBaseShaderToggle();
|
||||
EditorUtility.SetDirty(_target);
|
||||
}
|
||||
|
||||
// EditorGUI.BeginChangeCheck();
|
||||
// EditorGUILayout.PropertyField(isPostProcessShader, new GUIContent("使用 后处理扭曲"));
|
||||
// if (EditorGUI.EndChangeCheck())
|
||||
// {
|
||||
// serializedObject.ApplyModifiedProperties();
|
||||
// // _target.InitPostProcessToggle();
|
||||
// EditorUtility.SetDirty(_target);
|
||||
// }
|
||||
|
||||
// if (isPostProcessShader.boolValue)
|
||||
// {
|
||||
// GUI.enabled = false;
|
||||
// EditorGUILayout.PropertyField(postProcessingController);
|
||||
// GUI.enabled = true;
|
||||
// }
|
||||
|
||||
EditorGUILayout.PropertyField(propertyName, new GUIContent("Shader 属性名"));
|
||||
}
|
||||
|
||||
void DrawAnimationSection()
|
||||
{
|
||||
EditorGUILayout.LabelField("序列帧设置", EditorStyles.boldLabel);
|
||||
|
||||
EditorGUI.BeginChangeCheck();
|
||||
EditorGUILayout.PropertyField(xSize, new GUIContent("横向帧数量"));
|
||||
EditorGUILayout.PropertyField(ySize, new GUIContent("纵向帧数量"));
|
||||
if (EditorGUI.EndChangeCheck())
|
||||
{
|
||||
serializedObject.ApplyModifiedProperties();
|
||||
_target.Init();
|
||||
EditorUtility.SetDirty(_target);
|
||||
}
|
||||
|
||||
EditorGUILayout.Space(4);
|
||||
EditorGUILayout.PropertyField(manualPlay, new GUIContent("手动控制播放"));
|
||||
|
||||
if (manualPlay.boolValue)
|
||||
{
|
||||
EditorGUILayout.PropertyField(manualPlayePos, new GUIContent("手动播放位置"));
|
||||
}
|
||||
else
|
||||
{
|
||||
EditorGUILayout.PropertyField(speed, new GUIContent("播放速度 fps"));
|
||||
}
|
||||
}
|
||||
|
||||
void DrawRuntimeInfo()
|
||||
{
|
||||
EditorGUILayout.LabelField("运行时信息", EditorStyles.boldLabel);
|
||||
|
||||
GUI.enabled = false;
|
||||
EditorGUILayout.PropertyField(scaleOffset, new GUIContent("Tiling Offset"));
|
||||
EditorGUILayout.PropertyField(mat, new GUIContent("Material"));
|
||||
EditorGUILayout.PropertyField(frameIndex);
|
||||
EditorGUILayout.PropertyField(frameCount);
|
||||
GUI.enabled = true;
|
||||
}
|
||||
|
||||
void DrawInitButton()
|
||||
{
|
||||
if (GUILayout.Button("初始化", GUILayout.Height(28)))
|
||||
{
|
||||
_target.Init();
|
||||
EditorUtility.SetDirty(_target);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2e1a5d6748bd4515869cb9c6ebd2b548
|
||||
timeCreated: 1769260616
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 01d5272ee28d1384d9f555c579592a6b
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"name": "com.xuanxuan.nb.shaders.Editor",
|
||||
"rootNamespace": "",
|
||||
"references": [
|
||||
"GUID:0e3b0e6ce60c7a34094f8f9822c0b7f2",
|
||||
"GUID:8495541fcd41b0c40b5b6e6e7a7639d1",
|
||||
"GUID:8f9e4d586616f13449cfeb86c5f704c2"
|
||||
],
|
||||
"includePlatforms": [
|
||||
"Editor"
|
||||
],
|
||||
"excludePlatforms": [],
|
||||
"allowUnsafeCode": false,
|
||||
"overrideReferences": false,
|
||||
"precompiledReferences": [],
|
||||
"autoReferenced": true,
|
||||
"defineConstraints": [],
|
||||
"versionDefines": [],
|
||||
"noEngineReferences": false
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5e03fab8dc9c256468083d9bc82a73c3
|
||||
AssemblyDefinitionImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in new issue
Block a user