Roman d1d6ad1c2a 1.导入马骨骼
2.测试IK成功
3.导入必要的插件:InputSystem、CinemaMachine、Dotween、ASE、Odin

好累啊,下班
2022-07-18 23:15:27 +08:00

66 lines
1.8 KiB
C#

// Amplify Shader Editor - Visual Shader Editing Tool
// Copyright (c) Amplify Creations, Lda <info@amplify.pt>
using System;
using UnityEditor;
using UnityEngine;
namespace AmplifyShaderEditor
{
[Serializable]
[NodeAttributes( "Bone Blend Weights" , "Vertex Data" , "Bone blend weights for skinned Meshes" )]
public sealed class BlendWeightsNode : VertexDataNode
{
private const string IncorrectUnityVersionMessage = "This info is only available on Unity 2019.1 or above.";
private const string StandardSurfaceErrorMessage = "This info is not available on standard surface shaders.";
protected override void CommonInit( int uniqueId )
{
base.CommonInit( uniqueId );
m_currentVertexData = GeneratorUtils.VertexBlendWeightsStr;
m_errorMessageTypeIsError = NodeMessageType.Error;
}
public override void OnNodeLogicUpdate( DrawInfo drawInfo )
{
base.OnNodeLogicUpdate( drawInfo );
#if UNITY_2019_1_OR_NEWER
if( UIUtils.CurrentWindow.OutsideGraph.IsStandardSurface )
{
if( !m_showErrorMessage )
{
m_showErrorMessage = true;
m_errorMessageTooltip = StandardSurfaceErrorMessage;
}
}
else
{
m_showErrorMessage = false;
}
#else
if( !m_showErrorMessage )
{
m_showErrorMessage = true;
m_errorMessageTooltip = IncorrectUnityVersionMessage;
}
#endif
}
public override string GenerateShaderForOutput( int outputId , ref MasterNodeDataCollector dataCollector , bool ignoreLocalVar )
{
#if UNITY_2019_1_OR_NEWER
string blendWeights = string.Empty;
if( dataCollector.MasterNodeCategory == AvailableShaderTypes.Template )
{
blendWeights = dataCollector.TemplateDataCollectorInstance.GetBlendWeights();
return GetOutputVectorItem( 0 , outputId , blendWeights );
}
return GenerateErrorValue( outputId );
#else
return GenerateErrorValue( outputId );
#endif
}
}
}