This commit is contained in:
corn
2026-06-07 22:59:32 +08:00
commit a62ff7379b
7171 changed files with 10015624 additions and 0 deletions

View File

@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 78c6a6fc36ee7d444a04a70032cf3a13
folderAsset: yes
timeCreated: 1567574252
licenseType: Store
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 33e323ee1cdd21b42af6d3b9e1c1c672
folderAsset: yes
timeCreated: 1567574252
licenseType: Store
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

View File

@@ -0,0 +1,135 @@
fileFormatVersion: 2
guid: fa5494a2346c59e40961fd9af4a9b988
labels:
- AllCreature
- Icon
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 11
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 0
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 2
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 1
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 64
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 64
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Android
maxTextureSize: 64
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: WebGL
maxTextureSize: 64
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID:
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 4e0887d8708df9540bea102b7ea7e3f1
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,84 @@
using System.Linq;
using UnityEditor;
using UnityEngine;
namespace MalbersAnimations
{
public class MalbersMenu : EditorWindow
{
const string URPL_Shader_Path2020 = "Assets/Malbers Animations/Common/Shaders/URP_Malbers Shaders 2020.unitypackage";
const string URPL_Shader_Path2021 = "Assets/Malbers Animations/Common/Shaders/URP_Malbers Shaders 2021.unitypackage";
const string HRPL20_Shader_Path = "Assets/Malbers Animations/Common/Shaders/HDRP_MalbersShaders 2020.unitypackage";
[MenuItem("Tools/Malbers Animations/Malbers URP Shaders [Unity 2020]", false, 1)]
public static void UpgradeMaterialsURPL2020() => AssetDatabase.ImportPackage(URPL_Shader_Path2020, true);
[MenuItem("Tools/Malbers Animations/Malbers URP Shaders [Unity 2021]", false, 1)]
public static void UpgradeMaterialsURPL2021() => AssetDatabase.ImportPackage(URPL_Shader_Path2021, true);
[MenuItem("Tools/Malbers Animations/Malbers HDRP Shaders", false, 1)]
public static void UpgradeMaterialsHRPL2020() => AssetDatabase.ImportPackage(HRPL20_Shader_Path, true);
[MenuItem("Tools/Malbers Animations/Create Test Scene", false, 100)]
public static void CreateTestPlane()
{
var all = UnityEngine.SceneManagement.SceneManager.GetActiveScene().GetRootGameObjects().ToList();
var mainCam = all.Find(x => x.name == "Main Camera");
if (mainCam)
{ DestroyImmediate(mainCam); }
var TestPlane = GameObject.CreatePrimitive(PrimitiveType.Plane);
TestPlane.transform.localScale = new Vector3(20, 1, 20);
TestPlane.GetComponent<MeshRenderer>().sharedMaterial = AssetDatabase.LoadAssetAtPath("Assets/Malbers Animations/Common/Shaders/Ground_20.mat", typeof(Material)) as Material;
TestPlane.isStatic = true;
var BrainCam = AssetDatabase.LoadAssetAtPath("Assets/Malbers Animations/Common/Cinemachine/CM Brain.prefab", typeof(GameObject)) as GameObject;
var CMFreeLook = AssetDatabase.LoadAssetAtPath("Assets/Malbers Animations/Common/Cinemachine/CM FreeLook Main.prefab", typeof(GameObject)) as GameObject;
var WolfLite = AssetDatabase.LoadAssetAtPath("Assets/Malbers Animations/Animal Controller/Wolf Lite/Wolf Lite.prefab", typeof(GameObject)) as GameObject;
var Steve = AssetDatabase.LoadAssetAtPath("Assets/Malbers Animations/Animal Controller/Human/Steve.prefab", typeof(GameObject)) as GameObject;
if (BrainCam) PrefabUtility.InstantiatePrefab(BrainCam);
if (CMFreeLook) PrefabUtility.InstantiatePrefab(CMFreeLook);
if (WolfLite) PrefabUtility.InstantiatePrefab(WolfLite);
if (Steve) PrefabUtility.InstantiatePrefab(Steve);
}
[MenuItem("Tools/Malbers Animations/Integrations", false, 10)]
public static void OpenIntegrations() => Application.OpenURL("https://malbersanimations.gitbook.io/animal-controller/annex/integrations");
[MenuItem("Tools/Malbers Animations/Tools/Remove All MonoBehaviours from Selected", false, 100)]
public static void RemoveMono()
{
var allGo = Selection.gameObjects;
if (allGo != null)
{
foreach (var selected in allGo)
{
var AllComponents = selected.GetComponentsInChildren<MonoBehaviour>(true);
Debug.Log($"Removed {AllComponents.Length} from {selected}", selected);
foreach (var comp in AllComponents)
{
var t = comp.gameObject;
DestroyImmediate(comp);
EditorUtility.SetDirty(t);
}
}
}
}
}
}

View File

@@ -0,0 +1,13 @@
fileFormatVersion: 2
guid: 19bc351f0d267ce4c98eaaff4295e3fa
labels:
- AllCreature
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 9f0fd9c06259d1241bb255424d09078c
folderAsset: yes
timeCreated: 1532052238
licenseType: Store
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,214 @@
using System;
using System.Linq;
using System.Collections.Generic;
using UnityEngine;
#if UNITY_EDITOR
using UnityEditor.PackageManager.Requests;
using UnityEditor.PackageManager;
using UnityEditor;
#endif
namespace MalbersAnimations
{
/// <summary> Base on the New Unity Readme component </summary>
public class Readme : ScriptableObject
{
public Texture2D icon;
public string title;
public Section[] sections;
public List<string> packages = new List<string>() { "com.unity.cinemachine" , "com.unity.mathematics" };
[Serializable]
public class Section
{
public string heading, text, linkText, url;
public UnityEngine.Object reference;
}
}
#if UNITY_EDITOR
[CustomEditor(typeof(Readme))]
public class ReadmeEditor : Editor
{
static float kSpace = 16f;
private ListRequest list;
private AddRequest add;
Readme M;
private void OnEnable()
{
M = (Readme)target;
list = Client.List();
}
bool HasPackage(string id) => id.Contains('@') ? list.Result.Any(x => x.packageId == id) : list.Result.Any(x => x.packageId.Split('@')[0] == id);
protected override void OnHeaderGUI()
{
var readme = (Readme)target;
Init();
var iconWidth = Mathf.Min(EditorGUIUtility.currentViewWidth / 3f - 20f, 128f);
GUILayout.BeginHorizontal("In BigTitle");
{
GUILayout.Label(readme.icon, GUILayout.Width(iconWidth), GUILayout.Height(iconWidth));
GUILayout.Label(readme.title, TitleStyle);
}
GUILayout.EndHorizontal();
}
public override void OnInspectorGUI()
{
var readme = (Readme)target;
DrawPackageDependencies(readme);
Init();
foreach (var section in readme.sections)
{
float newspace = kSpace;
if (string.IsNullOrEmpty(section.heading)) newspace = 6;
GUILayout.Space(newspace);
if (!string.IsNullOrEmpty(section.heading))
{
GUILayout.Label(section.heading, HeadingStyle);
}
if (!string.IsNullOrEmpty(section.text))
{
GUILayout.Label(section.text, BodyStyle);
}
if (section.reference != null)
{
#pragma warning disable CS0618 // Type or member is obsolete
_ = EditorGUILayout.ObjectField(section.reference, typeof(UnityEngine.Object));
#pragma warning restore CS0618 // Type or member is obsolete
}
if (!string.IsNullOrEmpty(section.linkText))
{
if (LinkLabel(new GUIContent(section.linkText)))
{
Application.OpenURL(section.url);
}
}
}
}
private void DrawPackageDependencies(Readme readme)
{
if (M.packages == null || M.packages.Count == 0) return;
EditorGUILayout.BeginVertical(EditorStyles.helpBox);
{
GUILayout.Label("Package Dependencies", EditorStyles.boldLabel);
// We are adding a new package, wait for the operation to finish and then relist.
if (add != null && add.IsCompleted)
{
add = null;
list = Client.List();
}
if (add != null || !list.IsCompleted)
Repaint();// Keep refreshing while we are waiting for Packman to resolve our request.
else
{
if (!readme.packages.All(x => HasPackage(x)))
EditorGUILayout.HelpBox($"This Asset requires the following packages to be installed in your Project. \nPlease install all the required packages!", MessageType.Warning);
}
foreach (var req in readme.packages)
{
Rect rect = EditorGUILayout.GetControlRect(true, 20);
GUI.Label(rect, new GUIContent(req), EditorStyles.label);
rect.width -= 160;
rect.x += 160;
if (add != null || !list.IsCompleted)
{
using (new EditorGUI.DisabledScope(true))
{
GUI.Label(rect, "checking…", EditorStyles.label);
}
}
else if (HasPackage(req))
{
GUI.Label(rect, $"OK \u2713", EditorStyles.boldLabel);
}
else
{
GUI.Label(rect, "Missing \u2717", EditorStyles.label);
rect.x += rect.width - 80;
rect.width = 80;
if (GUI.Button(rect, "Install")) add = Client.Add(req);
}
}
}
EditorGUILayout.EndVertical();
}
bool m_Initialized;
GUIStyle LinkStyle { get { return m_LinkStyle; } }
[SerializeField] GUIStyle m_LinkStyle;
GUIStyle TitleStyle { get { return m_TitleStyle; } }
[SerializeField] GUIStyle m_TitleStyle;
GUIStyle HeadingStyle { get { return m_HeadingStyle; } }
[SerializeField] GUIStyle m_HeadingStyle;
GUIStyle BodyStyle { get { return m_BodyStyle; } }
[SerializeField] GUIStyle m_BodyStyle;
void Init()
{
if (m_Initialized)
return;
m_BodyStyle = new GUIStyle(EditorStyles.label);
m_BodyStyle.wordWrap = true;
m_BodyStyle.fontSize = 14;
m_TitleStyle = new GUIStyle(m_BodyStyle);
m_TitleStyle.fontSize = 26;
m_HeadingStyle = new GUIStyle(m_BodyStyle);
m_HeadingStyle.fontSize = 18;
m_LinkStyle = new GUIStyle(m_BodyStyle);
m_LinkStyle.wordWrap = false;
// Match selection color which works nicely for both light and dark skins
m_LinkStyle.normal.textColor = new Color(0x00 / 255f, 0x78 / 255f, 0xDA / 255f, 1f);
m_LinkStyle.stretchWidth = false;
m_Initialized = true;
}
bool LinkLabel(GUIContent label, params GUILayoutOption[] options)
{
var position = GUILayoutUtility.GetRect(label, LinkStyle, options);
Handles.BeginGUI();
Handles.color = LinkStyle.normal.textColor;
Handles.DrawLine(new Vector3(position.xMin, position.yMax), new Vector3(position.xMax, position.yMax));
Handles.color = Color.white;
Handles.EndGUI();
EditorGUIUtility.AddCursorRect(position, MouseCursor.Link);
return GUI.Button(position, label, LinkStyle);
}
}
#endif
}

View File

@@ -0,0 +1,14 @@
fileFormatVersion: 2
guid: 00fcb0528820550499d051030855ca6d
labels:
- AllCreature
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences:
- icon: {fileID: 2800000, guid: fa5494a2346c59e40961fd9af4a9b988, type: 3}
executionOrder: 0
icon: {fileID: 2800000, guid: fa5494a2346c59e40961fd9af4a9b988, type: 3}
userData:
assetBundleName:
assetBundleVariant: