mirror of
https://gitee.com/jisol/jisol-game/
synced 2025-06-26 03:14:47 +00:00
轻轻松松改成定点数咯
This commit is contained in:
parent
0371576f87
commit
930911e7df
@ -70,6 +70,7 @@ namespace GAS.Editor
|
|||||||
|
|
||||||
writer.WriteLine("using System;");
|
writer.WriteLine("using System;");
|
||||||
writer.WriteLine("using System.Collections.Generic;");
|
writer.WriteLine("using System.Collections.Generic;");
|
||||||
|
writer.WriteLine("using JNGame.Math;");
|
||||||
|
|
||||||
writer.WriteLine("");
|
writer.WriteLine("");
|
||||||
|
|
||||||
@ -97,14 +98,14 @@ namespace GAS.Editor
|
|||||||
writer.WriteLine("");
|
writer.WriteLine("");
|
||||||
{
|
{
|
||||||
writer.WriteLine($"/// <summary>{attributeAccessor.Comment}</summary>");
|
writer.WriteLine($"/// <summary>{attributeAccessor.Comment}</summary>");
|
||||||
writer.WriteLine($"public AttributeBase {validAttrName} {{ get; }} = new(\"AS_{validName}\", \"{attributeName}\", {attributeAccessor.DefaultValue}f, CalculateMode.{attributeAccessor.CalculateMode}, (SupportedOperation){(byte)attributeAccessor.SupportedOperation}, {(attributeAccessor.LimitMinValue ? attributeAccessor.MinValue + "f" : "float.MinValue")}, {(attributeAccessor.LimitMaxValue ? attributeAccessor.MaxValue + "f" : "float.MaxValue")});");
|
writer.WriteLine($"public AttributeBase {validAttrName} {{ get; }} = new(\"AS_{validName}\", \"{attributeName}\", new LFloat(true,{attributeAccessor.DefaultValue.rawValue}), {(attributeAccessor.LimitMinValue ? $"new LFloat(true,{attributeAccessor.MinValue.rawValue})" : "LFloat.MinValue")}, {(attributeAccessor.LimitMaxValue ? $"new LFloat(true,{attributeAccessor.MaxValue.rawValue})" : "LFloat.MaxValue")}, CalculateMode.{attributeAccessor.CalculateMode}, (SupportedOperation){(byte)attributeAccessor.SupportedOperation});");
|
||||||
writer.WriteLine("");
|
writer.WriteLine("");
|
||||||
writer.WriteLine($"public void Init{validAttrName}(float value) => {validAttrName}.Init(value);");
|
writer.WriteLine($"public void Init{validAttrName}(LFloat value) => {validAttrName}.Init(value);");
|
||||||
writer.WriteLine($"public void SetCurrent{validAttrName}(float value) => {validAttrName}.SetCurrentValue(value);");
|
writer.WriteLine($"public void SetCurrent{validAttrName}(LFloat value) => {validAttrName}.SetCurrentValue(value);");
|
||||||
writer.WriteLine($"public void SetBase{validAttrName}(float value) => {validAttrName}.SetBaseValue(value);");
|
writer.WriteLine($"public void SetBase{validAttrName}(LFloat value) => {validAttrName}.SetBaseValue(value);");
|
||||||
writer.WriteLine($"public void SetMin{validAttrName}(float value) => {validAttrName}.SetMinValue(value);");
|
writer.WriteLine($"public void SetMin{validAttrName}(LFloat value) => {validAttrName}.SetMinValue(value);");
|
||||||
writer.WriteLine($"public void SetMax{validAttrName}(float value) => {validAttrName}.SetMaxValue(value);");
|
writer.WriteLine($"public void SetMax{validAttrName}(LFloat value) => {validAttrName}.SetMaxValue(value);");
|
||||||
writer.WriteLine($"public void SetMinMax{validAttrName}(float min, float max) => {validAttrName}.SetMinMaxValue(min, max);");
|
writer.WriteLine($"public void SetMinMax{validAttrName}(LFloat min, LFloat max) => {validAttrName}.SetMinMaxValue(min, max);");
|
||||||
}
|
}
|
||||||
writer.WriteLine("");
|
writer.WriteLine("");
|
||||||
writer.WriteLine($"#endregion {attributeName}");
|
writer.WriteLine($"#endregion {attributeName}");
|
||||||
|
@ -5,6 +5,7 @@ using GAS.Editor.General;
|
|||||||
using GAS.General;
|
using GAS.General;
|
||||||
using GAS.General.Validation;
|
using GAS.General.Validation;
|
||||||
using GAS.Runtime;
|
using GAS.Runtime;
|
||||||
|
using JNGame.Math;
|
||||||
using Sirenix.OdinInspector;
|
using Sirenix.OdinInspector;
|
||||||
using UnityEditor;
|
using UnityEditor;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
@ -191,7 +192,7 @@ namespace GAS.Editor
|
|||||||
[DelayedProperty]
|
[DelayedProperty]
|
||||||
[PropertyOrder(5)]
|
[PropertyOrder(5)]
|
||||||
[HorizontalGroup("$DisplayName/Values")]
|
[HorizontalGroup("$DisplayName/Values")]
|
||||||
public float DefaultValue = 0f;
|
public LFloat DefaultValue = LFloat.L0;
|
||||||
|
|
||||||
[FoldoutGroup("$DisplayName")]
|
[FoldoutGroup("$DisplayName")]
|
||||||
[LabelText("最小值"), LabelWidth(40)]
|
[LabelText("最小值"), LabelWidth(40)]
|
||||||
@ -207,7 +208,7 @@ namespace GAS.Editor
|
|||||||
[PropertyOrder(6)]
|
[PropertyOrder(6)]
|
||||||
[EnableIf("LimitMinValue")]
|
[EnableIf("LimitMinValue")]
|
||||||
[HorizontalGroup("$DisplayName/Values")]
|
[HorizontalGroup("$DisplayName/Values")]
|
||||||
public float MinValue = float.MinValue;
|
public LFloat MinValue = LFloat.MinValue;
|
||||||
|
|
||||||
[FoldoutGroup("$DisplayName")]
|
[FoldoutGroup("$DisplayName")]
|
||||||
[LabelText("最大值"), LabelWidth(50)]
|
[LabelText("最大值"), LabelWidth(50)]
|
||||||
@ -222,7 +223,7 @@ namespace GAS.Editor
|
|||||||
[PropertyOrder(7)]
|
[PropertyOrder(7)]
|
||||||
[EnableIf("LimitMaxValue")]
|
[EnableIf("LimitMaxValue")]
|
||||||
[HorizontalGroup("$DisplayName/Values")]
|
[HorizontalGroup("$DisplayName/Values")]
|
||||||
public float MaxValue = float.MaxValue;
|
public LFloat MaxValue = LFloat.MaxValue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,3 +1,5 @@
|
|||||||
|
using JNGame.Math;
|
||||||
|
|
||||||
#if UNITY_EDITOR
|
#if UNITY_EDITOR
|
||||||
namespace GAS.Editor
|
namespace GAS.Editor
|
||||||
{
|
{
|
||||||
@ -41,7 +43,7 @@ namespace GAS.Editor
|
|||||||
|
|
||||||
EditorGUILayout.BeginHorizontal();
|
EditorGUILayout.BeginHorizontal();
|
||||||
EditorGUILayout.LabelField("Value:", GUILayout.Width(100));
|
EditorGUILayout.LabelField("Value:", GUILayout.Width(100));
|
||||||
_sourceModifier.ModiferMagnitude = EditorGUILayout.FloatField("", _sourceModifier.ModiferMagnitude);
|
_sourceModifier.ModiferMagnitude = EditorGUILayout.FloatField("", _sourceModifier.ModiferMagnitude).ToLFloat();
|
||||||
EditorGUILayout.EndHorizontal();
|
EditorGUILayout.EndHorizontal();
|
||||||
|
|
||||||
EditorGUILayout.Space();
|
EditorGUILayout.Space();
|
||||||
|
@ -621,12 +621,17 @@ namespace JNGame.Math
|
|||||||
/// 毫秒单位时间 = 0.001f
|
/// 毫秒单位时间 = 0.001f
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static readonly LFloat EPS_1MS = new LFloat(null, 1L);
|
public static readonly LFloat EPS_1MS = new LFloat(null, 1L);
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 0
|
||||||
|
/// </summary>
|
||||||
|
public static LFloat L0 => 0.ToLFloat();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 10
|
/// 10
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static LFloat L05 => new("",500);
|
public static LFloat L0D5 => new("",500);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 10
|
/// 10
|
||||||
@ -652,6 +657,11 @@ namespace JNGame.Math
|
|||||||
/// 10000
|
/// 10000
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static readonly LFloat L10000 = 10000.ToLFloat();
|
public static readonly LFloat L10000 = 10000.ToLFloat();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 360
|
||||||
|
/// </summary>
|
||||||
|
public static readonly LFloat L360 = 360.ToLFloat();
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
|
@ -577,6 +577,14 @@ namespace JNGame.Math
|
|||||||
|
|
||||||
#region Min、Max、Clamp相关
|
#region Min、Max、Clamp相关
|
||||||
|
|
||||||
|
public static bool Approximately(LFloat a, LFloat b)
|
||||||
|
{
|
||||||
|
// 计算两个浮点数之间的差的绝对值
|
||||||
|
float difference = Abs(a - b);
|
||||||
|
// 检查差的绝对值是否小于阈值
|
||||||
|
return difference < LFloat.EPSILON;
|
||||||
|
}
|
||||||
|
|
||||||
public static int Clamp(int value, int min, int max)
|
public static int Clamp(int value, int min, int max)
|
||||||
{
|
{
|
||||||
if (value < min)
|
if (value < min)
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using GAS.Runtime;
|
using GAS.Runtime;
|
||||||
|
using JNGame.Math;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace GAS.General
|
namespace GAS.General
|
||||||
@ -17,7 +18,7 @@ namespace GAS.General
|
|||||||
public static int CurrentFrameCount => _currentFrameCount;
|
public static int CurrentFrameCount => _currentFrameCount;
|
||||||
public static void UpdateCurrentFrameCount()
|
public static void UpdateCurrentFrameCount()
|
||||||
{
|
{
|
||||||
_currentFrameCount = Mathf.FloorToInt((Timestamp() - _startTimestamp) / 1000f * JexGasManager.FrameRate);
|
_currentFrameCount = LMath.FloorToInt((Timestamp() - _startTimestamp) / LFloat.L1000 * JexGasManager.FrameRate);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static long _startTimestamp;
|
private static long _startTimestamp;
|
||||||
|
@ -1,17 +1,18 @@
|
|||||||
using UnityEngine;
|
using JNGame.Math;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
namespace GAS.General
|
namespace GAS.General
|
||||||
{
|
{
|
||||||
public static class DebugExtension
|
public static class DebugExtension
|
||||||
{
|
{
|
||||||
[System.Diagnostics.Conditional("UNITY_EDITOR")]
|
[System.Diagnostics.Conditional("UNITY_EDITOR")]
|
||||||
public static void DebugBox(Vector2 center, Vector2 size, float angle, Color color, float showTime)
|
public static void DebugBox(LVector2 center, LVector2 size, LFloat angle, Color color, LFloat showTime)
|
||||||
{
|
{
|
||||||
var halfSize = size * 0.5f;
|
var halfSize = size * LFloat.L0D5;
|
||||||
var p1 = new Vector2(center.x - halfSize.x, center.y - halfSize.y);
|
var p1 = new LVector2(center.x - halfSize.x, center.y - halfSize.y);
|
||||||
var p2 = new Vector2(center.x + halfSize.x, center.y - halfSize.y);
|
var p2 = new LVector2(center.x + halfSize.x, center.y - halfSize.y);
|
||||||
var p3 = new Vector2(center.x + halfSize.x, center.y + halfSize.y);
|
var p3 = new LVector2(center.x + halfSize.x, center.y + halfSize.y);
|
||||||
var p4 = new Vector2(center.x - halfSize.x, center.y + halfSize.y);
|
var p4 = new LVector2(center.x - halfSize.x, center.y + halfSize.y);
|
||||||
// p1 绕center旋转angle角度
|
// p1 绕center旋转angle角度
|
||||||
p1 = RotatePoint(center, p1, angle);
|
p1 = RotatePoint(center, p1, angle);
|
||||||
p2 = RotatePoint(center, p2, angle);
|
p2 = RotatePoint(center, p2, angle);
|
||||||
@ -23,24 +24,24 @@ namespace GAS.General
|
|||||||
DrawLine(p4, p1, color, showTime);
|
DrawLine(p4, p1, color, showTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Vector2 RotatePoint(Vector2 center, Vector2 point, float angle)
|
public static LVector2 RotatePoint(LVector2 center, LVector2 point, LFloat angle)
|
||||||
{
|
{
|
||||||
var cos = Mathf.Cos(angle * Mathf.Deg2Rad);
|
var cos = LMath.Cos(angle * LMath.Deg2Rad);
|
||||||
var sin = Mathf.Sin(angle * Mathf.Deg2Rad);
|
var sin = LMath.Sin(angle * LMath.Deg2Rad);
|
||||||
var x = cos * (point.x - center.x) - sin * (point.y - center.y) + center.x;
|
var x = cos * (point.x - center.x) - sin * (point.y - center.y) + center.x;
|
||||||
var y = sin * (point.x - center.x) + cos * (point.y - center.y) + center.y;
|
var y = sin * (point.x - center.x) + cos * (point.y - center.y) + center.y;
|
||||||
return new Vector2(x, y);
|
return new LVector2(x, y);
|
||||||
}
|
}
|
||||||
|
|
||||||
[System.Diagnostics.Conditional("UNITY_EDITOR")]
|
[System.Diagnostics.Conditional("UNITY_EDITOR")]
|
||||||
public static void DebugDrawCircle(Vector2 center, float radius, Color color, float showTime, float segments = 120)
|
public static void DebugDrawCircle(LVector2 center, LFloat radius, Color color, LFloat showTime, LFloat segments = default) // segments = 120
|
||||||
{
|
{
|
||||||
var step = 360f / segments;
|
var step = LFloat.L360 / segments;
|
||||||
var from = center + new Vector2(radius, 0);
|
var from = center + new LVector2(radius, LFloat.L0);
|
||||||
for (var i = 0; i < segments; i++)
|
for (var i = 0; i < segments; i++)
|
||||||
{
|
{
|
||||||
var to = center + new Vector2(radius * Mathf.Cos((i + 1) * step * Mathf.Deg2Rad),
|
var to = center + new LVector2(radius * LMath.Cos((i + 1) * step * LMath.Deg2Rad),
|
||||||
radius * Mathf.Sin((i + 1) * step * Mathf.Deg2Rad));
|
radius * LMath.Sin((i + 1) * step * LMath.Deg2Rad));
|
||||||
DrawLine(from, to, color, showTime);
|
DrawLine(from, to, color, showTime);
|
||||||
from = to;
|
from = to;
|
||||||
}
|
}
|
||||||
@ -52,20 +53,20 @@ namespace GAS.General
|
|||||||
/// <param name="position">位置, 圆心</param>
|
/// <param name="position">位置, 圆心</param>
|
||||||
/// <param name="rotation">旋转</param>
|
/// <param name="rotation">旋转</param>
|
||||||
/// <param name="radius">半径</param>
|
/// <param name="radius">半径</param>
|
||||||
/// <param name="segments">分段数(建议与角度适配, 如每10°分一段: segments = Mathf.CeilToInt(angle / 10))</param>
|
/// <param name="segments">分段数(建议与角度适配, 如每10°分一段: segments = LMath.CeilToInt(angle / 10))</param>
|
||||||
/// <param name="color">颜色</param>
|
/// <param name="color">颜色</param>
|
||||||
/// <param name="duration">绘制时长(0为1帧)</param>
|
/// <param name="duration">绘制时长(0为1帧)</param>
|
||||||
[System.Diagnostics.Conditional("UNITY_EDITOR")]
|
[System.Diagnostics.Conditional("UNITY_EDITOR")]
|
||||||
public static void DrawCircle(in Vector3 position, in Quaternion rotation, float radius, int segments = 36,
|
public static void DrawCircle(in LVector3 position, in LQuaternion rotation, LFloat radius, int segments = 36,
|
||||||
in Color? color = null, float duration = 0f)
|
in Color? color = null, LFloat duration = default) //duration = 0
|
||||||
{
|
{
|
||||||
DrawArc(position, rotation, radius, 360, segments, color, duration);
|
DrawArc(position, rotation, radius, 360, segments, color, duration);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void DrawCircle(in Vector3 position, in Vector3 forward, float radius, int segments = 36,
|
public static void DrawCircle(in LVector3 position, in LVector3 forward, LFloat radius, int segments = 36,
|
||||||
in Color? color = null, float duration = 0f)
|
in Color? color = null, LFloat duration = default) //duration = 0
|
||||||
{
|
{
|
||||||
DrawCircle(position, Quaternion.LookRotation(forward), radius, segments, color, duration);
|
DrawCircle(position, LQuaternion.LookRotation(forward), radius, segments, color, duration);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -75,33 +76,33 @@ namespace GAS.General
|
|||||||
/// <param name="rotation">旋转</param>
|
/// <param name="rotation">旋转</param>
|
||||||
/// <param name="radius">半径</param>
|
/// <param name="radius">半径</param>
|
||||||
/// <param name="angle">角度</param>
|
/// <param name="angle">角度</param>
|
||||||
/// <param name="segments">分段数(建议与角度适配, 如每10°分一段: segments = Mathf.CeilToInt(angle / 10))(建议与角度适配, 如每10°分一段: segments = Mathf.CeilToInt(angle / 10))</param>
|
/// <param name="segments">分段数(建议与角度适配, 如每10°分一段: segments = LMath.CeilToInt(angle / 10))(建议与角度适配, 如每10°分一段: segments = LMath.CeilToInt(angle / 10))</param>
|
||||||
/// <param name="color">颜色</param>
|
/// <param name="color">颜色</param>
|
||||||
/// <param name="duration">绘制时长(0为1帧)</param>
|
/// <param name="duration">绘制时长(0为1帧)</param>
|
||||||
[System.Diagnostics.Conditional("UNITY_EDITOR")]
|
[System.Diagnostics.Conditional("UNITY_EDITOR")]
|
||||||
public static void DrawArc(in Vector3 position, in Quaternion rotation, float radius, float angle, int segments = 12,
|
public static void DrawArc(in LVector3 position, in LQuaternion rotation, LFloat radius, LFloat angle, int segments = 12,
|
||||||
in Color? color = null, float duration = 0f)
|
in Color? color = null, LFloat duration = default) //duration = 0
|
||||||
{
|
{
|
||||||
if (angle <= 0) return;
|
if (angle <= 0) return;
|
||||||
if (radius <= 0) return;
|
if (radius <= 0) return;
|
||||||
if (segments <= 0) return;
|
if (segments <= 0) return;
|
||||||
|
|
||||||
var angleStep = angle / segments;
|
var angleStep = angle / segments;
|
||||||
var lastPoint = position + rotation * (Vector3.right * radius);
|
var lastPoint = position + rotation * (LVector3.Right * radius);
|
||||||
for (int i = 1; i <= segments; i++)
|
for (int i = 1; i <= segments; i++)
|
||||||
{
|
{
|
||||||
var currentAngle = i * angleStep;
|
var currentAngle = i * angleStep;
|
||||||
var nextPoint = position + rotation * (Quaternion.Euler(0, currentAngle, 0) * Vector3.right * radius);
|
var nextPoint = position + rotation * (LQuaternion.Euler(0, currentAngle, 0) * LVector3.Right * radius);
|
||||||
DrawLine(lastPoint, nextPoint, color, duration);
|
DrawLine(lastPoint, nextPoint, color, duration);
|
||||||
lastPoint = nextPoint;
|
lastPoint = nextPoint;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[System.Diagnostics.Conditional("UNITY_EDITOR")]
|
[System.Diagnostics.Conditional("UNITY_EDITOR")]
|
||||||
public static void DrawArc(in Vector3 position, in Vector3 forward, float radius, float angle, int segments = 12,
|
public static void DrawArc(in LVector3 position, in LVector3 forward, LFloat radius, LFloat angle, int segments = 12,
|
||||||
in Color? color = null, float duration = 0f)
|
in Color? color = null, LFloat duration = default) //duration = 0
|
||||||
{
|
{
|
||||||
DrawArc(position, Quaternion.LookRotation(forward), radius, angle, segments, color, duration);
|
DrawArc(position, LQuaternion.LookRotation(forward), radius, angle, segments, color, duration);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -111,27 +112,27 @@ namespace GAS.General
|
|||||||
/// <param name="rotation">旋转</param>
|
/// <param name="rotation">旋转</param>
|
||||||
/// <param name="outerRadius">外圈半径</param>
|
/// <param name="outerRadius">外圈半径</param>
|
||||||
/// <param name="innerRadius">内圈半径</param>
|
/// <param name="innerRadius">内圈半径</param>
|
||||||
/// <param name="segments">分段数(建议与角度适配, 如每10°分一段: segments = Mathf.CeilToInt(angle / 10))</param>
|
/// <param name="segments">分段数(建议与角度适配, 如每10°分一段: segments = LMath.CeilToInt(angle / 10))</param>
|
||||||
/// <param name="color">颜色</param>
|
/// <param name="color">颜色</param>
|
||||||
/// <param name="duration">绘制时长(0为1帧)</param>
|
/// <param name="duration">绘制时长(0为1帧)</param>
|
||||||
[System.Diagnostics.Conditional("UNITY_EDITOR")]
|
[System.Diagnostics.Conditional("UNITY_EDITOR")]
|
||||||
public static void DrawRing(in Vector3 position, in Quaternion rotation, float outerRadius, float innerRadius, int segments = 36,
|
public static void DrawRing(in LVector3 position, in LQuaternion rotation, LFloat outerRadius, LFloat innerRadius, int segments = 36,
|
||||||
in Color? color = null, float duration = 0f)
|
in Color? color = null, LFloat duration = default) //duration = 0
|
||||||
{
|
{
|
||||||
if (outerRadius <= 0) return;
|
if (outerRadius <= 0) return;
|
||||||
if (segments <= 0) return;
|
if (segments <= 0) return;
|
||||||
|
|
||||||
innerRadius = Mathf.Clamp(innerRadius, 0, outerRadius);
|
innerRadius = LMath.Clamp(innerRadius, LFloat.L0, outerRadius);
|
||||||
|
|
||||||
// 计算圆的每个点的位置
|
// 计算圆的每个点的位置
|
||||||
var angleStep = 360f / segments;
|
var angleStep = LFloat.L360 / segments;
|
||||||
var lastOuterPoint = position + rotation * (Vector3.right * outerRadius);
|
var lastOuterPoint = position + rotation * (LVector3.Right * outerRadius);
|
||||||
var lastInnerPoint = position + rotation * (Vector3.right * innerRadius);
|
var lastInnerPoint = position + rotation * (LVector3.Right * innerRadius);
|
||||||
for (int i = 1; i <= segments; i++)
|
for (int i = 1; i <= segments; i++)
|
||||||
{
|
{
|
||||||
var angle = i * angleStep;
|
var angle = i * angleStep;
|
||||||
var nextOuterPoint = position + rotation * (Quaternion.Euler(0, angle, 0) * Vector3.right * outerRadius);
|
var nextOuterPoint = position + rotation * (LQuaternion.Euler(0, angle, 0) * LVector3.Right * outerRadius);
|
||||||
var nextInnerPoint = position + rotation * (Quaternion.Euler(0, angle, 0) * Vector3.right * innerRadius);
|
var nextInnerPoint = position + rotation * (LQuaternion.Euler(0, angle, 0) * LVector3.Right * innerRadius);
|
||||||
DrawLine(lastOuterPoint, nextOuterPoint, color, duration);
|
DrawLine(lastOuterPoint, nextOuterPoint, color, duration);
|
||||||
DrawLine(lastInnerPoint, nextInnerPoint, color, duration);
|
DrawLine(lastInnerPoint, nextInnerPoint, color, duration);
|
||||||
DrawLine(nextOuterPoint, nextInnerPoint, color, duration);
|
DrawLine(nextOuterPoint, nextInnerPoint, color, duration);
|
||||||
@ -141,10 +142,10 @@ namespace GAS.General
|
|||||||
}
|
}
|
||||||
|
|
||||||
[System.Diagnostics.Conditional("UNITY_EDITOR")]
|
[System.Diagnostics.Conditional("UNITY_EDITOR")]
|
||||||
public static void DrawRing(in Vector3 position, in Vector3 forward, float outerRadius, float innerRadius, int segments = 36,
|
public static void DrawRing(in LVector3 position, in LVector3 forward, LFloat outerRadius, LFloat innerRadius, int segments = 36,
|
||||||
in Color? color = null, float duration = 0f)
|
in Color? color = null, LFloat duration = default) //duration = 0
|
||||||
{
|
{
|
||||||
DrawRing(position, Quaternion.LookRotation(forward), outerRadius, innerRadius, segments, color, duration);
|
DrawRing(position, LQuaternion.LookRotation(forward), outerRadius, innerRadius, segments, color, duration);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -156,16 +157,16 @@ namespace GAS.General
|
|||||||
/// <param name="color">颜色</param>
|
/// <param name="color">颜色</param>
|
||||||
/// <param name="duration">绘制时长(0为1帧)</param>
|
/// <param name="duration">绘制时长(0为1帧)</param>
|
||||||
[System.Diagnostics.Conditional("UNITY_EDITOR")]
|
[System.Diagnostics.Conditional("UNITY_EDITOR")]
|
||||||
public static void DrawRectangle(in Vector3 position, in Quaternion rotation, in Vector2 size,
|
public static void DrawRectangle(in LVector3 position, in LQuaternion rotation, in LVector2 size,
|
||||||
in Color? color = null, float duration = 0f)
|
in Color? color = null, LFloat duration = default) //duration = 0
|
||||||
{
|
{
|
||||||
// 计算矩形的四个角点在局部坐标系中的位置
|
// 计算矩形的四个角点在局部坐标系中的位置
|
||||||
var halfSize = new Vector3(size.x * 0.5f, 0, size.y * 0.5f);
|
var halfSize = new LVector3(size.x * LFloat.L0D5, LFloat.L0, size.y * LFloat.L0D5);
|
||||||
var corners = new Vector3[4];
|
var corners = new LVector3[4];
|
||||||
corners[0] = new Vector3(-halfSize.x, 0, -halfSize.z); // 左下角
|
corners[0] = new LVector3(-halfSize.x, LFloat.L0, -halfSize.z); // 左下角
|
||||||
corners[1] = new Vector3(halfSize.x, 0, -halfSize.z); // 右下角
|
corners[1] = new LVector3(halfSize.x, LFloat.L0, -halfSize.z); // 右下角
|
||||||
corners[2] = new Vector3(halfSize.x, 0, halfSize.z); // 右上角
|
corners[2] = new LVector3(halfSize.x, LFloat.L0, halfSize.z); // 右上角
|
||||||
corners[3] = new Vector3(-halfSize.x, 0, halfSize.z); // 左上角
|
corners[3] = new LVector3(-halfSize.x, LFloat.L0, halfSize.z); // 左上角
|
||||||
|
|
||||||
// 旋转角点并转换到世界坐标系
|
// 旋转角点并转换到世界坐标系
|
||||||
for (int i = 0; i < corners.Length; i++)
|
for (int i = 0; i < corners.Length; i++)
|
||||||
@ -181,10 +182,10 @@ namespace GAS.General
|
|||||||
}
|
}
|
||||||
|
|
||||||
[System.Diagnostics.Conditional("UNITY_EDITOR")]
|
[System.Diagnostics.Conditional("UNITY_EDITOR")]
|
||||||
public static void DrawRectangle(in Vector3 position, in Vector3 forward, in Vector2 size,
|
public static void DrawRectangle(in LVector3 position, in LVector3 forward, in LVector2 size,
|
||||||
in Color? color = null, float duration = 0f)
|
in Color? color = null, LFloat duration = default) //duration = 0
|
||||||
{
|
{
|
||||||
DrawRectangle(position, Quaternion.LookRotation(forward), size, color, duration);
|
DrawRectangle(position, LQuaternion.LookRotation(forward), size, color, duration);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -196,16 +197,16 @@ namespace GAS.General
|
|||||||
/// <param name="color">颜色</param>
|
/// <param name="color">颜色</param>
|
||||||
/// <param name="duration">绘制时长(0为1帧)</param>
|
/// <param name="duration">绘制时长(0为1帧)</param>
|
||||||
[System.Diagnostics.Conditional("UNITY_EDITOR")]
|
[System.Diagnostics.Conditional("UNITY_EDITOR")]
|
||||||
public static void DrawFrontRectangle(in Vector3 position, in Quaternion rotation, in Vector2 size,
|
public static void DrawFrontRectangle(in LVector3 position, in LQuaternion rotation, in LVector2 size,
|
||||||
in Color? color = null, float duration = 0f)
|
in Color? color = null, LFloat duration = default) //duration = 0
|
||||||
{
|
{
|
||||||
// 计算矩形的四个角点在局部坐标系中的位置
|
// 计算矩形的四个角点在局部坐标系中的位置
|
||||||
var halfX = size.x * 0.5f;
|
var halfX = size.x * LFloat.L0D5;
|
||||||
var corners = new Vector3[4];
|
var corners = new LVector3[4];
|
||||||
corners[0] = new Vector3(-halfX, 0, 0); // 左下角
|
corners[0] = new LVector3(-halfX, LFloat.L0, LFloat.L0); // 左下角
|
||||||
corners[1] = new Vector3(halfX, 0, 0); // 右下角
|
corners[1] = new LVector3(halfX, LFloat.L0, LFloat.L0); // 右下角
|
||||||
corners[2] = new Vector3(halfX, 0, size.y); // 右上角
|
corners[2] = new LVector3(halfX, LFloat.L0, size.y); // 右上角
|
||||||
corners[3] = new Vector3(-halfX, 0, size.y); // 左上角
|
corners[3] = new LVector3(-halfX, LFloat.L0, size.y); // 左上角
|
||||||
|
|
||||||
// 旋转角点并转换到世界坐标系
|
// 旋转角点并转换到世界坐标系
|
||||||
for (int i = 0; i < corners.Length; i++)
|
for (int i = 0; i < corners.Length; i++)
|
||||||
@ -221,10 +222,10 @@ namespace GAS.General
|
|||||||
}
|
}
|
||||||
|
|
||||||
[System.Diagnostics.Conditional("UNITY_EDITOR")]
|
[System.Diagnostics.Conditional("UNITY_EDITOR")]
|
||||||
public static void DrawFrontRectangle(in Vector3 position, in Vector3 forward, in Vector2 size,
|
public static void DrawFrontRectangle(in LVector3 position, in LVector3 forward, in LVector2 size,
|
||||||
in Color? color = null, float duration = 0f)
|
in Color? color = null, LFloat duration = default) //duration = 0
|
||||||
{
|
{
|
||||||
DrawFrontRectangle(position, Quaternion.LookRotation(forward), size, color, duration);
|
DrawFrontRectangle(position, LQuaternion.LookRotation(forward), size, color, duration);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -236,24 +237,24 @@ namespace GAS.General
|
|||||||
/// <param name="color">颜色</param>
|
/// <param name="color">颜色</param>
|
||||||
/// <param name="duration">绘制时长(0为1帧)</param>
|
/// <param name="duration">绘制时长(0为1帧)</param>
|
||||||
[System.Diagnostics.Conditional("UNITY_EDITOR")]
|
[System.Diagnostics.Conditional("UNITY_EDITOR")]
|
||||||
public static void DrawCube(in Vector3 position, in Quaternion rotation, in Vector3 size,
|
public static void DrawCube(in LVector3 position, in LQuaternion rotation, in LVector3 size,
|
||||||
in Color? color = null, float duration = 0f)
|
in Color? color = null, LFloat duration = default) //duration = 0
|
||||||
{
|
{
|
||||||
// 计算立方体的八个顶点在局部坐标系中的位置
|
// 计算立方体的八个顶点在局部坐标系中的位置
|
||||||
var halfSize = size * 0.5f;
|
var halfSize = size * LFloat.L0D5;
|
||||||
var vertices = new Vector3[8];
|
var vertices = new LVector3[8];
|
||||||
|
|
||||||
// 下底面四个顶点
|
// 下底面四个顶点
|
||||||
vertices[0] = new Vector3(-halfSize.x, -halfSize.y, -halfSize.z);
|
vertices[0] = new LVector3(-halfSize.x, -halfSize.y, -halfSize.z);
|
||||||
vertices[1] = new Vector3(halfSize.x, -halfSize.y, -halfSize.z);
|
vertices[1] = new LVector3(halfSize.x, -halfSize.y, -halfSize.z);
|
||||||
vertices[2] = new Vector3(halfSize.x, -halfSize.y, halfSize.z);
|
vertices[2] = new LVector3(halfSize.x, -halfSize.y, halfSize.z);
|
||||||
vertices[3] = new Vector3(-halfSize.x, -halfSize.y, halfSize.z);
|
vertices[3] = new LVector3(-halfSize.x, -halfSize.y, halfSize.z);
|
||||||
|
|
||||||
// 上顶面四个顶点
|
// 上顶面四个顶点
|
||||||
vertices[4] = new Vector3(-halfSize.x, halfSize.y, -halfSize.z);
|
vertices[4] = new LVector3(-halfSize.x, halfSize.y, -halfSize.z);
|
||||||
vertices[5] = new Vector3(halfSize.x, halfSize.y, -halfSize.z);
|
vertices[5] = new LVector3(halfSize.x, halfSize.y, -halfSize.z);
|
||||||
vertices[6] = new Vector3(halfSize.x, halfSize.y, halfSize.z);
|
vertices[6] = new LVector3(halfSize.x, halfSize.y, halfSize.z);
|
||||||
vertices[7] = new Vector3(-halfSize.x, halfSize.y, halfSize.z);
|
vertices[7] = new LVector3(-halfSize.x, halfSize.y, halfSize.z);
|
||||||
|
|
||||||
// 旋转顶点并转换到世界坐标系
|
// 旋转顶点并转换到世界坐标系
|
||||||
for (int i = 0; i < vertices.Length; i++)
|
for (int i = 0; i < vertices.Length; i++)
|
||||||
@ -279,10 +280,10 @@ namespace GAS.General
|
|||||||
}
|
}
|
||||||
|
|
||||||
[System.Diagnostics.Conditional("UNITY_EDITOR")]
|
[System.Diagnostics.Conditional("UNITY_EDITOR")]
|
||||||
public static void DrawCube(in Vector3 position, in Vector3 forward, in Vector3 size,
|
public static void DrawCube(in LVector3 position, in LVector3 forward, in LVector3 size,
|
||||||
in Color? color = null, float duration = 0f)
|
in Color? color = null, LFloat duration = default) //duration = 0
|
||||||
{
|
{
|
||||||
DrawCube(position, Quaternion.LookRotation(forward), size, color, duration);
|
DrawCube(position, LQuaternion.LookRotation(forward), size, color, duration);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -296,10 +297,10 @@ namespace GAS.General
|
|||||||
/// <param name="color"></param>
|
/// <param name="color"></param>
|
||||||
/// <param name="duration"></param>
|
/// <param name="duration"></param>
|
||||||
[System.Diagnostics.Conditional("UNITY_EDITOR")]
|
[System.Diagnostics.Conditional("UNITY_EDITOR")]
|
||||||
public static void DrawCylinder(in Vector3 position, in Quaternion rotation, float radius, float height, int segments = 12,
|
public static void DrawCylinder(in LVector3 position, in LQuaternion rotation, LFloat radius, LFloat height, int segments = 12,
|
||||||
in Color? color = null, float duration = 0f)
|
in Color? color = null, LFloat duration = default) //duration = 0
|
||||||
{
|
{
|
||||||
var offset = rotation * Vector3.up * (height * 0.5f);
|
var offset = rotation * LVector3.Up * (height * LFloat.L0D5);
|
||||||
var topCenter = position + offset;
|
var topCenter = position + offset;
|
||||||
var bottomCenter = position - offset;
|
var bottomCenter = position - offset;
|
||||||
DrawCylinder(topCenter, bottomCenter, radius, segments, color, duration);
|
DrawCylinder(topCenter, bottomCenter, radius, segments, color, duration);
|
||||||
@ -316,42 +317,42 @@ namespace GAS.General
|
|||||||
/// <param name="color"></param>
|
/// <param name="color"></param>
|
||||||
/// <param name="duration"></param>
|
/// <param name="duration"></param>
|
||||||
[System.Diagnostics.Conditional("UNITY_EDITOR")]
|
[System.Diagnostics.Conditional("UNITY_EDITOR")]
|
||||||
public static void DrawCylinder(in Vector3 position, in Vector3 forward, float radius, float height, int segments = 12,
|
public static void DrawCylinder(in LVector3 position, in LVector3 forward, LFloat radius, LFloat height, int segments = 12,
|
||||||
in Color? color = null, float duration = 0f)
|
in Color? color = null, LFloat duration = default) //duration = 0
|
||||||
{
|
{
|
||||||
DrawCylinder(position, Quaternion.LookRotation(forward), radius, height, segments, in color, duration);
|
DrawCylinder(position, LQuaternion.LookRotation(forward), radius, height, segments, in color, duration);
|
||||||
}
|
}
|
||||||
|
|
||||||
[System.Diagnostics.Conditional("UNITY_EDITOR")]
|
[System.Diagnostics.Conditional("UNITY_EDITOR")]
|
||||||
public static void DrawCylinder(in Vector3 topCenter, in Vector3 bottomCenter, float radius, int segments = 12,
|
public static void DrawCylinder(in LVector3 topCenter, in LVector3 bottomCenter, LFloat radius, int segments = 12,
|
||||||
in Color? color = null, float duration = 0f)
|
in Color? color = null, LFloat duration = default) //duration = 0
|
||||||
{
|
{
|
||||||
if (radius <= 0) return;
|
if (radius <= 0) return;
|
||||||
if (segments <= 0) return;
|
if (segments <= 0) return;
|
||||||
|
|
||||||
if (Vector3.Distance(topCenter, bottomCenter) <= Mathf.Epsilon) return;
|
if (LVector3.Distance(topCenter, bottomCenter) <= LFloat.EPSILON) return;
|
||||||
|
|
||||||
var direction = (topCenter - bottomCenter).normalized;
|
var direction = (topCenter - bottomCenter).Normalized;
|
||||||
|
|
||||||
// 计算一个垂直于direction的向量作为forward
|
// 计算一个垂直于direction的向量作为forward
|
||||||
var forward = Vector3.Cross(direction, Vector3.up).normalized;
|
var forward = LVector3.Cross(direction, LVector3.Up).Normalized;
|
||||||
|
|
||||||
// 如果forward和direction平行(即direction和Vector3.up共线),则选择一个不同的方向作为forward
|
// 如果forward和direction平行(即direction和LVector3.up共线),则选择一个不同的方向作为forward
|
||||||
if (forward == Vector3.zero)
|
if (forward == LVector3.Zero)
|
||||||
{
|
{
|
||||||
forward = Vector3.Cross(direction, Vector3.right).normalized;
|
forward = LVector3.Cross(direction, LVector3.Right).Normalized;
|
||||||
}
|
}
|
||||||
|
|
||||||
var rotation = Quaternion.LookRotation(forward, direction);
|
var rotation = LQuaternion.LookRotation(forward, direction);
|
||||||
|
|
||||||
var angleStep = 360f / segments;
|
var angleStep = LFloat.L360 / segments;
|
||||||
var offset = rotation * (Vector3.right * radius);
|
var offset = rotation * (LVector3.Right * radius);
|
||||||
var lastTopPoint = topCenter + offset;
|
var lastTopPoint = topCenter + offset;
|
||||||
var lastBottomPoint = bottomCenter + offset;
|
var lastBottomPoint = bottomCenter + offset;
|
||||||
for (int i = 1; i <= segments; i++)
|
for (int i = 1; i <= segments; i++)
|
||||||
{
|
{
|
||||||
var currentAngle = i * angleStep;
|
var currentAngle = i * angleStep;
|
||||||
offset = rotation * (Quaternion.Euler(0, currentAngle, 0) * (Vector3.right * radius));
|
offset = rotation * (LQuaternion.Euler(0, currentAngle, 0) * (LVector3.Right * radius));
|
||||||
var nextTopPoint = topCenter + offset;
|
var nextTopPoint = topCenter + offset;
|
||||||
var nextBottomPoint = bottomCenter + offset;
|
var nextBottomPoint = bottomCenter + offset;
|
||||||
DrawLine(lastTopPoint, nextTopPoint, color, duration);
|
DrawLine(lastTopPoint, nextTopPoint, color, duration);
|
||||||
@ -369,21 +370,21 @@ namespace GAS.General
|
|||||||
/// <param name="rotation">旋转</param>
|
/// <param name="rotation">旋转</param>
|
||||||
/// <param name="radius">扇形的半径</param>
|
/// <param name="radius">扇形的半径</param>
|
||||||
/// <param name="angle">扇形的角度(度)</param>
|
/// <param name="angle">扇形的角度(度)</param>
|
||||||
/// <param name="segments">分段数(建议与角度适配, 如每10°分一段: segments = Mathf.CeilToInt(angle / 10))</param>
|
/// <param name="segments">分段数(建议与角度适配, 如每10°分一段: segments = LMath.CeilToInt(angle / 10))</param>
|
||||||
/// <param name="color">颜色</param>
|
/// <param name="color">颜色</param>
|
||||||
/// <param name="duration">绘制时长(0为1帧)</param>
|
/// <param name="duration">绘制时长(0为1帧)</param>
|
||||||
[System.Diagnostics.Conditional("UNITY_EDITOR")]
|
[System.Diagnostics.Conditional("UNITY_EDITOR")]
|
||||||
public static void DrawSector(Vector3 position, Quaternion rotation, float radius, float angle, int segments = 12,
|
public static void DrawSector(LVector3 position, LQuaternion rotation, LFloat radius, LFloat angle, int segments = 12,
|
||||||
Color? color = null, float duration = 0f)
|
Color? color = null, LFloat duration = default) //duration = 0
|
||||||
{
|
{
|
||||||
DrawAnnularSector(position, rotation, radius, 0, angle, segments, color, duration);
|
DrawAnnularSector(position, rotation, radius, 0, angle, segments, color, duration);
|
||||||
}
|
}
|
||||||
|
|
||||||
[System.Diagnostics.Conditional("UNITY_EDITOR")]
|
[System.Diagnostics.Conditional("UNITY_EDITOR")]
|
||||||
public static void DrawSector(in Vector3 position, in Vector3 forward, float radius, float angle, int segments = 12,
|
public static void DrawSector(in LVector3 position, in LVector3 forward, LFloat radius, LFloat angle, int segments = 12,
|
||||||
in Color? color = null, float duration = 0f)
|
in Color? color = null, LFloat duration = default) //duration = 0
|
||||||
{
|
{
|
||||||
DrawSector(position, Quaternion.LookRotation(forward), radius, angle, segments, color, duration);
|
DrawSector(position, LQuaternion.LookRotation(forward), radius, angle, segments, color, duration);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -395,29 +396,29 @@ namespace GAS.General
|
|||||||
/// <param name="outerRadius">扇形的外半径</param>
|
/// <param name="outerRadius">扇形的外半径</param>
|
||||||
/// <param name="innerRadius">扇形的内半径, 为0时为标准扇形</param>
|
/// <param name="innerRadius">扇形的内半径, 为0时为标准扇形</param>
|
||||||
/// <param name="angle">扇形的角度(度)</param>
|
/// <param name="angle">扇形的角度(度)</param>
|
||||||
/// <param name="segments">分段数(建议与角度适配, 如每10°分一段: segments = Mathf.CeilToInt(angle / 10))</param>
|
/// <param name="segments">分段数(建议与角度适配, 如每10°分一段: segments = LMath.CeilToInt(angle / 10))</param>
|
||||||
/// <param name="color">颜色</param>
|
/// <param name="color">颜色</param>
|
||||||
/// <param name="duration">绘制时长(0为1帧)</param>
|
/// <param name="duration">绘制时长(0为1帧)</param>
|
||||||
[System.Diagnostics.Conditional("UNITY_EDITOR")]
|
[System.Diagnostics.Conditional("UNITY_EDITOR")]
|
||||||
public static void DrawAnnularSector(in Vector3 position, in Quaternion rotation, float outerRadius, float innerRadius, float angle, int segments = 12,
|
public static void DrawAnnularSector(in LVector3 position, in LQuaternion rotation, LFloat outerRadius, LFloat innerRadius, LFloat angle, int segments = 12,
|
||||||
in Color? color = null, float duration = 0f)
|
in Color? color = null, LFloat duration = default) //duration = 0
|
||||||
{
|
{
|
||||||
if (outerRadius <= 0) return;
|
if (outerRadius <= 0) return;
|
||||||
if (segments <= 0) return;
|
if (segments <= 0) return;
|
||||||
if (angle <= 0) return;
|
if (angle <= 0) return;
|
||||||
|
|
||||||
innerRadius = Mathf.Clamp(innerRadius, 0, outerRadius);
|
innerRadius = LMath.Clamp(innerRadius, LFloat.L0, outerRadius);
|
||||||
|
|
||||||
var angleStep = angle / segments;
|
var angleStep = angle / segments;
|
||||||
var currentAngle = -angle * 0.5f;
|
var currentAngle = -angle * LFloat.L0D5;
|
||||||
|
|
||||||
var outerPoints = new Vector3[segments + 1];
|
var outerPoints = new LVector3[segments + 1];
|
||||||
var innerPoints = new Vector3[segments + 1];
|
var innerPoints = new LVector3[segments + 1];
|
||||||
|
|
||||||
// 计算内外扇形的点
|
// 计算内外扇形的点
|
||||||
for (var i = 0; i <= segments; i++)
|
for (var i = 0; i <= segments; i++)
|
||||||
{
|
{
|
||||||
var currentDirection = rotation * Quaternion.Euler(0, currentAngle, 0) * Vector3.forward;
|
var currentDirection = rotation * LQuaternion.Euler(0, currentAngle, 0) * LVector3.Forward;
|
||||||
outerPoints[i] = position + currentDirection * outerRadius;
|
outerPoints[i] = position + currentDirection * outerRadius;
|
||||||
innerPoints[i] = position + currentDirection * innerRadius;
|
innerPoints[i] = position + currentDirection * innerRadius;
|
||||||
currentAngle += angleStep;
|
currentAngle += angleStep;
|
||||||
@ -443,9 +444,9 @@ namespace GAS.General
|
|||||||
}
|
}
|
||||||
|
|
||||||
[System.Diagnostics.Conditional("UNITY_EDITOR")]
|
[System.Diagnostics.Conditional("UNITY_EDITOR")]
|
||||||
public static void DrawAnnularSector(in Vector3 position, in Vector3 forward, float outerRadius, float innerRadius, float angle, int segments = 12, in Color? color = null, float duration = 0f)
|
public static void DrawAnnularSector(in LVector3 position, in LVector3 forward, LFloat outerRadius, LFloat innerRadius, LFloat angle, int segments = 12, in Color? color = null, LFloat duration = default) //duration = 0
|
||||||
{
|
{
|
||||||
DrawAnnularSector(position, Quaternion.LookRotation(forward), outerRadius, innerRadius, angle, segments, color, duration);
|
DrawAnnularSector(position, LQuaternion.LookRotation(forward), outerRadius, innerRadius, angle, segments, color, duration);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -456,9 +457,9 @@ namespace GAS.General
|
|||||||
/// <param name="color">颜色</param>
|
/// <param name="color">颜色</param>
|
||||||
/// <param name="duration">绘制时长(0为1帧)</param>
|
/// <param name="duration">绘制时长(0为1帧)</param>
|
||||||
[System.Diagnostics.Conditional("UNITY_EDITOR")]
|
[System.Diagnostics.Conditional("UNITY_EDITOR")]
|
||||||
public static void DrawLine(in Vector3 start, in Vector3 end, in Color? color = null, float duration = 0f)
|
public static void DrawLine(in LVector3 start, in LVector3 end, in Color? color = null, LFloat duration = default) //duration = 0
|
||||||
{
|
{
|
||||||
Debug.DrawLine(start, end, color ?? Color.cyan, duration);
|
Debug.DrawLine(start.ToVector3(), end.ToVector3(), color ?? Color.cyan, duration);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -469,12 +470,12 @@ namespace GAS.General
|
|||||||
/// <param name="color">颜色</param>
|
/// <param name="color">颜色</param>
|
||||||
/// <param name="duration">绘制时长(0为1帧)</param>
|
/// <param name="duration">绘制时长(0为1帧)</param>
|
||||||
[System.Diagnostics.Conditional("UNITY_EDITOR")]
|
[System.Diagnostics.Conditional("UNITY_EDITOR")]
|
||||||
public static void DrawArrow(in Vector3 origin, in Vector3 destination, in Color? color = null, float duration = 0f)
|
public static void DrawArrow(in LVector3 origin, in LVector3 destination, in Color? color = null, LFloat duration = default) //duration = 0
|
||||||
{
|
{
|
||||||
DrawLine(origin, destination, color, duration);
|
DrawLine(origin, destination, color, duration);
|
||||||
var direction = destination - origin;
|
var direction = destination - origin;
|
||||||
var right = Quaternion.LookRotation(direction) * Quaternion.Euler(0, 180 + 30, 0) * Vector3.forward;
|
var right = LQuaternion.LookRotation(direction) * LQuaternion.Euler(0, 180 + 30, 0) * LVector3.Forward;
|
||||||
var left = Quaternion.LookRotation(direction) * Quaternion.Euler(0, 180 - 30, 0) * Vector3.forward;
|
var left = LQuaternion.LookRotation(direction) * LQuaternion.Euler(0, 180 - 30, 0) * LVector3.Forward;
|
||||||
DrawLine(destination, destination + right, color, duration);
|
DrawLine(destination, destination + right, color, duration);
|
||||||
DrawLine(destination, destination + left, color, duration);
|
DrawLine(destination, destination + left, color, duration);
|
||||||
}
|
}
|
||||||
@ -489,17 +490,17 @@ namespace GAS.General
|
|||||||
/// <param name="color">颜色</param>
|
/// <param name="color">颜色</param>
|
||||||
/// <param name="duration">绘制时长(0为1帧)</param>
|
/// <param name="duration">绘制时长(0为1帧)</param>
|
||||||
[System.Diagnostics.Conditional("UNITY_EDITOR")]
|
[System.Diagnostics.Conditional("UNITY_EDITOR")]
|
||||||
public static void DrawArrow(in Vector3 origin, in Quaternion rotation, float length, in Color? color = null, float duration = 0f)
|
public static void DrawArrow(in LVector3 origin, in LQuaternion rotation, LFloat length, in Color? color = null, LFloat duration = default) //duration = 0
|
||||||
{
|
{
|
||||||
var direction = rotation * Vector3.forward;
|
var direction = rotation * LVector3.Forward;
|
||||||
var destination = origin + direction * length;
|
var destination = origin + direction * length;
|
||||||
DrawArrow(origin, destination, color, duration);
|
DrawArrow(origin, destination, color, duration);
|
||||||
}
|
}
|
||||||
|
|
||||||
[System.Diagnostics.Conditional("UNITY_EDITOR")]
|
[System.Diagnostics.Conditional("UNITY_EDITOR")]
|
||||||
public static void DrawArrow(in Vector3 origin, in Vector3 direction, float length, in Color? color = null, float duration = 0f)
|
public static void DrawArrow(in LVector3 origin, in LVector3 direction, LFloat length, in Color? color = null, LFloat duration = default) //duration = 0
|
||||||
{
|
{
|
||||||
var destination = origin + direction.normalized * length;
|
var destination = origin + direction.Normalized * length;
|
||||||
DrawArrow(origin, destination, color, duration);
|
DrawArrow(origin, destination, color, duration);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
using System;
|
using System;
|
||||||
|
using JNGame.Math;
|
||||||
|
|
||||||
namespace GAS.Runtime
|
namespace GAS.Runtime
|
||||||
{
|
{
|
||||||
@ -137,11 +138,11 @@ namespace GAS.Runtime
|
|||||||
Owner.GetAttributeCurrentValue(modifier.AttributeSetName, modifier.AttributeShortName);
|
Owner.GetAttributeCurrentValue(modifier.AttributeSetName, modifier.AttributeShortName);
|
||||||
|
|
||||||
if (modifier.Operation == GEOperation.Add)
|
if (modifier.Operation == GEOperation.Add)
|
||||||
if (attributeCurrentValue + costValue < 0)
|
if (attributeCurrentValue != null && (attributeCurrentValue.Value + costValue) < LFloat.L0)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (modifier.Operation == GEOperation.Minus)
|
if (modifier.Operation == GEOperation.Minus)
|
||||||
if (attributeCurrentValue - costValue < 0)
|
if (attributeCurrentValue != null && (attributeCurrentValue.Value - costValue) < LFloat.L0)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
using UnityEngine.Profiling;
|
using JNGame.Math;
|
||||||
|
using UnityEngine.Profiling;
|
||||||
|
|
||||||
namespace GAS.Runtime
|
namespace GAS.Runtime
|
||||||
{
|
{
|
||||||
@ -19,7 +20,7 @@ namespace GAS.Runtime
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 不受播放速率影响的总时间
|
/// 不受播放速率影响的总时间
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public float TotalTime => _player.TotalTime;
|
public LFloat TotalTime => _player.TotalTime;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 向性技能的作用目标
|
/// 向性技能的作用目标
|
||||||
@ -41,7 +42,7 @@ namespace GAS.Runtime
|
|||||||
_player.Play();
|
_player.Play();
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual float GetPlaySpeed()
|
public virtual LFloat GetPlaySpeed()
|
||||||
{
|
{
|
||||||
return Data.AbilityAsset.Speed;
|
return Data.AbilityAsset.Speed;
|
||||||
}
|
}
|
||||||
|
@ -2,6 +2,7 @@ using System;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using GAS.General;
|
using GAS.General;
|
||||||
|
using JNGame.Math;
|
||||||
using Sirenix.OdinInspector;
|
using Sirenix.OdinInspector;
|
||||||
using UnityEditor;
|
using UnityEditor;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
@ -39,7 +40,7 @@ namespace GAS.Runtime
|
|||||||
[LabelText(GASTextDefine.ABILITY_PLAY_RATE)]
|
[LabelText(GASTextDefine.ABILITY_PLAY_RATE)]
|
||||||
[LabelWidth(100)]
|
[LabelWidth(100)]
|
||||||
[MinValue(0)]
|
[MinValue(0)]
|
||||||
public float Speed = 1.0f;
|
public LFloat Speed = 1;
|
||||||
|
|
||||||
[TabGroup("Data/H1/V1", "Timeline")]
|
[TabGroup("Data/H1/V1", "Timeline")]
|
||||||
[LabelText(GASTextDefine.ABILITY_MANUAL_ENDABILITY)]
|
[LabelText(GASTextDefine.ABILITY_MANUAL_ENDABILITY)]
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using GAS.General;
|
using GAS.General;
|
||||||
|
using JNGame.Math;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
//using UnityEngine.Profiling;
|
//using UnityEngine.Profiling;
|
||||||
@ -54,7 +55,7 @@ namespace GAS.Runtime
|
|||||||
private readonly List<AbilitySystemComponent> _targets = new();
|
private readonly List<AbilitySystemComponent> _targets = new();
|
||||||
|
|
||||||
private int _currentFrame;
|
private int _currentFrame;
|
||||||
private float _playTotalTime;
|
private LFloat _playTotalTime;
|
||||||
|
|
||||||
public TimelineAbilityPlayer(TimelineAbilitySpecT<AbilityT, AssetT> abilitySpec)
|
public TimelineAbilityPlayer(TimelineAbilitySpecT<AbilityT, AssetT> abilitySpec)
|
||||||
{
|
{
|
||||||
@ -71,7 +72,7 @@ namespace GAS.Runtime
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 不受播放速率影响的总时间
|
/// 不受播放速率影响的总时间
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public float TotalTime => (float)FrameCount / FrameRate;
|
public LFloat TotalTime => (LFloat)FrameCount / FrameRate;
|
||||||
|
|
||||||
private void Cache()
|
private void Cache()
|
||||||
{
|
{
|
||||||
|
@ -126,13 +126,13 @@ namespace GAS.Runtime
|
|||||||
// public LayerMask checkLayer;
|
// public LayerMask checkLayer;
|
||||||
// public CenterType centerType;
|
// public CenterType centerType;
|
||||||
//
|
//
|
||||||
// public Vector3 center;
|
// public LVector3 center;
|
||||||
//
|
//
|
||||||
// // Circle2D,Sphere3D
|
// // Circle2D,Sphere3D
|
||||||
// public float radius;
|
// public LFloat radius;
|
||||||
//
|
//
|
||||||
// // Box2D,Box3D
|
// // Box2D,Box3D
|
||||||
// public Vector3 size;
|
// public LVector3 size;
|
||||||
//
|
//
|
||||||
// // Custom
|
// // Custom
|
||||||
// public string customMethodRegisterKey;
|
// public string customMethodRegisterKey;
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using GAS.General;
|
using GAS.General;
|
||||||
|
using JNGame.Math;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace GAS.Runtime
|
namespace GAS.Runtime
|
||||||
@ -118,13 +119,13 @@ namespace GAS.Runtime
|
|||||||
/// 3._modifierCache的AttributeBased类的MMC,Track类属性变化时
|
/// 3._modifierCache的AttributeBased类的MMC,Track类属性变化时
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
float CalculateNewValue()
|
LFloat CalculateNewValue()
|
||||||
{
|
{
|
||||||
switch (_processedAttribute.CalculateMode)
|
switch (_processedAttribute.CalculateMode)
|
||||||
{
|
{
|
||||||
case CalculateMode.Stacking:
|
case CalculateMode.Stacking:
|
||||||
{
|
{
|
||||||
float newValue = _processedAttribute.BaseValue;
|
LFloat newValue = _processedAttribute.BaseValue;
|
||||||
foreach (var modifierSpec in _modifierCache)
|
foreach (var modifierSpec in _modifierCache)
|
||||||
{
|
{
|
||||||
var spec = modifierSpec.SpecRef;
|
var spec = modifierSpec.SpecRef;
|
||||||
@ -163,7 +164,7 @@ namespace GAS.Runtime
|
|||||||
case CalculateMode.MinValueOnly:
|
case CalculateMode.MinValueOnly:
|
||||||
{
|
{
|
||||||
var hasOverride = false;
|
var hasOverride = false;
|
||||||
var min = float.MaxValue;
|
var min = LFloat.MaxValue;
|
||||||
foreach (var modifierSpec in _modifierCache)
|
foreach (var modifierSpec in _modifierCache)
|
||||||
{
|
{
|
||||||
var spec = modifierSpec.SpecRef;
|
var spec = modifierSpec.SpecRef;
|
||||||
@ -180,7 +181,7 @@ namespace GAS.Runtime
|
|||||||
}
|
}
|
||||||
|
|
||||||
var magnitude = modifier.CalculateMagnitude(spec, modifier.ModiferMagnitude);
|
var magnitude = modifier.CalculateMagnitude(spec, modifier.ModiferMagnitude);
|
||||||
min = Mathf.Min(min, magnitude);
|
min = LMath.Min(min, magnitude);
|
||||||
hasOverride = true;
|
hasOverride = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -189,7 +190,7 @@ namespace GAS.Runtime
|
|||||||
case CalculateMode.MaxValueOnly:
|
case CalculateMode.MaxValueOnly:
|
||||||
{
|
{
|
||||||
var hasOverride = false;
|
var hasOverride = false;
|
||||||
var max = float.MinValue;
|
var max = LFloat.MinValue;
|
||||||
foreach (var modifierSpec in _modifierCache)
|
foreach (var modifierSpec in _modifierCache)
|
||||||
{
|
{
|
||||||
var spec = modifierSpec.SpecRef;
|
var spec = modifierSpec.SpecRef;
|
||||||
@ -206,7 +207,7 @@ namespace GAS.Runtime
|
|||||||
}
|
}
|
||||||
|
|
||||||
var magnitude = modifier.CalculateMagnitude(spec, modifier.ModiferMagnitude);
|
var magnitude = modifier.CalculateMagnitude(spec, modifier.ModiferMagnitude);
|
||||||
max = Mathf.Max(max, magnitude);
|
max = LMath.Max(max, magnitude);
|
||||||
hasOverride = true;
|
hasOverride = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -217,17 +218,17 @@ namespace GAS.Runtime
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void UpdateCurrentValueWhenBaseValueIsDirty(AttributeBase attribute, float oldBaseValue, float newBaseValue)
|
void UpdateCurrentValueWhenBaseValueIsDirty(AttributeBase attribute, LFloat oldBaseValue, LFloat newBaseValue)
|
||||||
{
|
{
|
||||||
if (Mathf.Approximately(oldBaseValue, newBaseValue)) return;
|
if (LMath.Approximately(oldBaseValue, newBaseValue)) return;
|
||||||
|
|
||||||
float newValue = CalculateNewValue();
|
LFloat newValue = CalculateNewValue();
|
||||||
_processedAttribute.SetCurrentValue(newValue);
|
_processedAttribute.SetCurrentValue(newValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
void UpdateCurrentValueWhenModifierIsDirty()
|
void UpdateCurrentValueWhenModifierIsDirty()
|
||||||
{
|
{
|
||||||
float newValue = CalculateNewValue();
|
LFloat newValue = CalculateNewValue();
|
||||||
_processedAttribute.SetCurrentValue(newValue);
|
_processedAttribute.SetCurrentValue(newValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -275,7 +276,7 @@ namespace GAS.Runtime
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnAttributeChanged(AttributeBase attribute, float oldValue, float newValue)
|
private void OnAttributeChanged(AttributeBase attribute, LFloat oldValue, LFloat newValue)
|
||||||
{
|
{
|
||||||
if (IsTrackingAttribute(attribute))
|
if (IsTrackingAttribute(attribute))
|
||||||
UpdateCurrentValueWhenModifierIsDirty();
|
UpdateCurrentValueWhenModifierIsDirty();
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using JNGame.Math;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace GAS.Runtime
|
namespace GAS.Runtime
|
||||||
@ -10,34 +11,34 @@ namespace GAS.Runtime
|
|||||||
public readonly string Name;
|
public readonly string Name;
|
||||||
public readonly string SetName;
|
public readonly string SetName;
|
||||||
public readonly string ShortName;
|
public readonly string ShortName;
|
||||||
protected event Action<AttributeBase, float, float> _onPostCurrentValueChange;
|
protected event Action<AttributeBase, LFloat, LFloat> _onPostCurrentValueChange;
|
||||||
protected event Action<AttributeBase, float, float> _onPostBaseValueChange;
|
protected event Action<AttributeBase, LFloat, LFloat> _onPostBaseValueChange;
|
||||||
protected event Action<AttributeBase, float> _onPreCurrentValueChange;
|
protected event Action<AttributeBase, LFloat> _onPreCurrentValueChange;
|
||||||
protected event Func<AttributeBase, float, float> _onPreBaseValueChange;
|
protected event Func<AttributeBase, LFloat, LFloat> _onPreBaseValueChange;
|
||||||
protected IEnumerable<Func<AttributeBase, float, float>> _preBaseValueChangeListeners;
|
protected IEnumerable<Func<AttributeBase, LFloat, LFloat>> _preBaseValueChangeListeners;
|
||||||
|
|
||||||
private AttributeValue _value;
|
private AttributeValue _value;
|
||||||
private AbilitySystemComponent _owner;
|
private AbilitySystemComponent _owner;
|
||||||
public AbilitySystemComponent Owner => _owner;
|
public AbilitySystemComponent Owner => _owner;
|
||||||
|
|
||||||
public AttributeBase(string attrSetName, string attrName, float value = 0,
|
public AttributeBase(string attrSetName, string attrName,
|
||||||
|
LFloat value,LFloat minValue, LFloat maxValue,
|
||||||
CalculateMode calculateMode = CalculateMode.Stacking,
|
CalculateMode calculateMode = CalculateMode.Stacking,
|
||||||
SupportedOperation supportedOperation = SupportedOperation.All,
|
SupportedOperation supportedOperation = SupportedOperation.All)
|
||||||
float minValue = float.MinValue, float maxValue = float.MaxValue)
|
|
||||||
{
|
{
|
||||||
SetName = attrSetName;
|
SetName = attrSetName;
|
||||||
Name = $"{attrSetName}.{attrName}";
|
Name = $"{attrSetName}.{attrName}";
|
||||||
ShortName = attrName;
|
ShortName = attrName;
|
||||||
_value = new AttributeValue(value, calculateMode, supportedOperation, minValue, maxValue);
|
_value = new AttributeValue(value, minValue,maxValue,calculateMode, supportedOperation);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public AttributeValue Value => _value;
|
public AttributeValue Value => _value;
|
||||||
public float BaseValue => _value.BaseValue;
|
public LFloat BaseValue => _value.BaseValue;
|
||||||
public float CurrentValue => _value.CurrentValue;
|
public LFloat CurrentValue => _value.CurrentValue;
|
||||||
|
|
||||||
public float MinValue => _value.MinValue;
|
public LFloat MinValue => _value.MinValue;
|
||||||
public float MaxValue => _value.MaxValue;
|
public LFloat MaxValue => _value.MaxValue;
|
||||||
|
|
||||||
public CalculateMode CalculateMode => _value.CalculateMode;
|
public CalculateMode CalculateMode => _value.CalculateMode;
|
||||||
public SupportedOperation SupportedOperation => _value.SupportedOperation;
|
public SupportedOperation SupportedOperation => _value.SupportedOperation;
|
||||||
@ -47,17 +48,17 @@ namespace GAS.Runtime
|
|||||||
_owner = owner;
|
_owner = owner;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetMinValue(float min)
|
public void SetMinValue(LFloat min)
|
||||||
{
|
{
|
||||||
_value.SetMinValue(min);
|
_value.SetMinValue(min);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetMaxValue(float max)
|
public void SetMaxValue(LFloat max)
|
||||||
{
|
{
|
||||||
_value.SetMaxValue(max);
|
_value.SetMaxValue(max);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetMinMaxValue(float min, float max)
|
public void SetMinMaxValue(LFloat min, LFloat max)
|
||||||
{
|
{
|
||||||
_value.SetMinValue(min);
|
_value.SetMinValue(min);
|
||||||
_value.SetMaxValue(max);
|
_value.SetMaxValue(max);
|
||||||
@ -68,26 +69,26 @@ namespace GAS.Runtime
|
|||||||
return _value.IsSupportOperation(operation);
|
return _value.IsSupportOperation(operation);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Init(float baseValue)
|
public void Init(LFloat baseValue)
|
||||||
{
|
{
|
||||||
SetBaseValue(baseValue);
|
SetBaseValue(baseValue);
|
||||||
SetCurrentValue(baseValue);
|
SetCurrentValue(baseValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetCurrentValue(float value)
|
public void SetCurrentValue(LFloat value)
|
||||||
{
|
{
|
||||||
value = Mathf.Clamp(value, _value.MinValue, _value.MaxValue);
|
value = LMath.Clamp(value, _value.MinValue, _value.MaxValue);
|
||||||
|
|
||||||
_onPreCurrentValueChange?.Invoke(this, value);
|
_onPreCurrentValueChange?.Invoke(this, value);
|
||||||
|
|
||||||
var oldValue = CurrentValue;
|
var oldValue = CurrentValue;
|
||||||
_value.SetCurrentValue(value);
|
_value.SetCurrentValue(value);
|
||||||
|
|
||||||
if (!Mathf.Approximately(oldValue, value))
|
if (!LMath.Approximately(oldValue, value))
|
||||||
_onPostCurrentValueChange?.Invoke(this, oldValue, value);
|
_onPostCurrentValueChange?.Invoke(this, oldValue, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetBaseValue(float value)
|
public void SetBaseValue(LFloat value)
|
||||||
{
|
{
|
||||||
if (_onPreBaseValueChange != null)
|
if (_onPreBaseValueChange != null)
|
||||||
{
|
{
|
||||||
@ -97,60 +98,60 @@ namespace GAS.Runtime
|
|||||||
var oldValue = _value.BaseValue;
|
var oldValue = _value.BaseValue;
|
||||||
_value.SetBaseValue(value);
|
_value.SetBaseValue(value);
|
||||||
|
|
||||||
if (!Mathf.Approximately(oldValue, value))
|
if (!LMath.Approximately(oldValue, value))
|
||||||
_onPostBaseValueChange?.Invoke(this, oldValue, value);
|
_onPostBaseValueChange?.Invoke(this, oldValue, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetCurrentValueWithoutEvent(float value)
|
public void SetCurrentValueWithoutEvent(LFloat value)
|
||||||
{
|
{
|
||||||
_value.SetCurrentValue(value);
|
_value.SetCurrentValue(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetBaseValueWithoutEvent(float value)
|
public void SetBaseValueWithoutEvent(LFloat value)
|
||||||
{
|
{
|
||||||
_value.SetBaseValue(value);
|
_value.SetBaseValue(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void RegisterPreBaseValueChange(Func<AttributeBase, float, float> func)
|
public void RegisterPreBaseValueChange(Func<AttributeBase, LFloat, LFloat> func)
|
||||||
{
|
{
|
||||||
_onPreBaseValueChange += func;
|
_onPreBaseValueChange += func;
|
||||||
_preBaseValueChangeListeners =
|
_preBaseValueChangeListeners =
|
||||||
_onPreBaseValueChange?.GetInvocationList().Cast<Func<AttributeBase, float, float>>();
|
_onPreBaseValueChange?.GetInvocationList().Cast<Func<AttributeBase, LFloat, LFloat>>();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void RegisterPostBaseValueChange(Action<AttributeBase, float, float> action)
|
public void RegisterPostBaseValueChange(Action<AttributeBase, LFloat, LFloat> action)
|
||||||
{
|
{
|
||||||
_onPostBaseValueChange += action;
|
_onPostBaseValueChange += action;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void RegisterPreCurrentValueChange(Action<AttributeBase, float> action)
|
public void RegisterPreCurrentValueChange(Action<AttributeBase, LFloat> action)
|
||||||
{
|
{
|
||||||
_onPreCurrentValueChange += action;
|
_onPreCurrentValueChange += action;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void RegisterPostCurrentValueChange(Action<AttributeBase, float, float> action)
|
public void RegisterPostCurrentValueChange(Action<AttributeBase, LFloat, LFloat> action)
|
||||||
{
|
{
|
||||||
_onPostCurrentValueChange += action;
|
_onPostCurrentValueChange += action;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void UnregisterPreBaseValueChange(Func<AttributeBase, float, float> func)
|
public void UnregisterPreBaseValueChange(Func<AttributeBase, LFloat, LFloat> func)
|
||||||
{
|
{
|
||||||
_onPreBaseValueChange -= func;
|
_onPreBaseValueChange -= func;
|
||||||
_preBaseValueChangeListeners =
|
_preBaseValueChangeListeners =
|
||||||
_onPreBaseValueChange?.GetInvocationList().Cast<Func<AttributeBase, float, float>>();
|
_onPreBaseValueChange?.GetInvocationList().Cast<Func<AttributeBase, LFloat, LFloat>>();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void UnregisterPostBaseValueChange(Action<AttributeBase, float, float> action)
|
public void UnregisterPostBaseValueChange(Action<AttributeBase, LFloat, LFloat> action)
|
||||||
{
|
{
|
||||||
_onPostBaseValueChange -= action;
|
_onPostBaseValueChange -= action;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void UnregisterPreCurrentValueChange(Action<AttributeBase, float> action)
|
public void UnregisterPreCurrentValueChange(Action<AttributeBase, LFloat> action)
|
||||||
{
|
{
|
||||||
_onPreCurrentValueChange -= action;
|
_onPreCurrentValueChange -= action;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void UnregisterPostCurrentValueChange(Action<AttributeBase, float, float> action)
|
public void UnregisterPostCurrentValueChange(Action<AttributeBase, LFloat, LFloat> action)
|
||||||
{
|
{
|
||||||
_onPostCurrentValueChange -= action;
|
_onPostCurrentValueChange -= action;
|
||||||
}
|
}
|
||||||
@ -163,7 +164,7 @@ namespace GAS.Runtime
|
|||||||
_onPostCurrentValueChange = null;
|
_onPostCurrentValueChange = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
private float InvokePreBaseValueChangeListeners(float value)
|
private LFloat InvokePreBaseValueChangeListeners(LFloat value)
|
||||||
{
|
{
|
||||||
if (_preBaseValueChangeListeners == null) return value;
|
if (_preBaseValueChangeListeners == null) return value;
|
||||||
|
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
using Sirenix.OdinInspector;
|
using JNGame.Math;
|
||||||
|
using Sirenix.OdinInspector;
|
||||||
|
|
||||||
namespace GAS.Runtime
|
namespace GAS.Runtime
|
||||||
{
|
{
|
||||||
@ -16,10 +17,11 @@ namespace GAS.Runtime
|
|||||||
|
|
||||||
public struct AttributeValue
|
public struct AttributeValue
|
||||||
{
|
{
|
||||||
public AttributeValue(float baseValue,
|
public AttributeValue(
|
||||||
|
LFloat baseValue,LFloat minValue, LFloat maxValue,
|
||||||
CalculateMode calculateMode = CalculateMode.Stacking,
|
CalculateMode calculateMode = CalculateMode.Stacking,
|
||||||
SupportedOperation supportedOperation = SupportedOperation.All,
|
SupportedOperation supportedOperation = SupportedOperation.All
|
||||||
float minValue = float.MinValue, float maxValue = float.MaxValue)
|
)
|
||||||
{
|
{
|
||||||
BaseValue = baseValue;
|
BaseValue = baseValue;
|
||||||
SupportedOperation = supportedOperation;
|
SupportedOperation = supportedOperation;
|
||||||
@ -32,36 +34,36 @@ namespace GAS.Runtime
|
|||||||
public CalculateMode CalculateMode { get; }
|
public CalculateMode CalculateMode { get; }
|
||||||
public SupportedOperation SupportedOperation { get; }
|
public SupportedOperation SupportedOperation { get; }
|
||||||
|
|
||||||
public float BaseValue { get; private set; }
|
public LFloat BaseValue { get; private set; }
|
||||||
public float CurrentValue { get; private set; }
|
public LFloat CurrentValue { get; private set; }
|
||||||
|
|
||||||
public float MinValue { get; private set; }
|
public LFloat MinValue { get; private set; }
|
||||||
public float MaxValue { get; private set; }
|
public LFloat MaxValue { get; private set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// ignore min and max value, set current value directly
|
/// ignore min and max value, set current value directly
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void SetCurrentValue(float value)
|
public void SetCurrentValue(LFloat value)
|
||||||
{
|
{
|
||||||
CurrentValue = value;
|
CurrentValue = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetBaseValue(float value)
|
public void SetBaseValue(LFloat value)
|
||||||
{
|
{
|
||||||
BaseValue = value;
|
BaseValue = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetMinValue(float min)
|
public void SetMinValue(LFloat min)
|
||||||
{
|
{
|
||||||
MinValue = min;
|
MinValue = min;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetMaxValue(float max)
|
public void SetMaxValue(LFloat max)
|
||||||
{
|
{
|
||||||
MaxValue = max;
|
MaxValue = max;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetMinMaxValue(float min, float max)
|
public void SetMinMaxValue(LFloat min, LFloat max)
|
||||||
{
|
{
|
||||||
MinValue = min;
|
MinValue = min;
|
||||||
MaxValue = max;
|
MaxValue = max;
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
namespace GAS.Runtime
|
using JNGame.Math;
|
||||||
|
|
||||||
|
namespace GAS.Runtime
|
||||||
{
|
{
|
||||||
public abstract class AttributeSet
|
public abstract class AttributeSet
|
||||||
{
|
{
|
||||||
@ -7,7 +9,7 @@
|
|||||||
public abstract AttributeBase this[string key] { get; }
|
public abstract AttributeBase this[string key] { get; }
|
||||||
public abstract string[] AttributeNames { get; }
|
public abstract string[] AttributeNames { get; }
|
||||||
public abstract void SetOwner(AbilitySystemComponent owner);
|
public abstract void SetOwner(AbilitySystemComponent owner);
|
||||||
public void ChangeAttributeBase(string attributeShortName, float value)
|
public void ChangeAttributeBase(string attributeShortName, LFloat value)
|
||||||
{
|
{
|
||||||
if (this[attributeShortName] != null)
|
if (this[attributeShortName] != null)
|
||||||
{
|
{
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using GAS.General;
|
using GAS.General;
|
||||||
|
using JNGame.Math;
|
||||||
|
|
||||||
namespace GAS.Runtime
|
namespace GAS.Runtime
|
||||||
{
|
{
|
||||||
@ -97,22 +98,22 @@ namespace GAS.Runtime
|
|||||||
: (CalculateMode?)null;
|
: (CalculateMode?)null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public float? GetAttributeBaseValue(string attrSetName, string attrShortName)
|
public LFloat? GetAttributeBaseValue(string attrSetName, string attrShortName)
|
||||||
{
|
{
|
||||||
return _attributeSets.TryGetValue(attrSetName, out var set) ? set[attrShortName].BaseValue : (float?)null;
|
return _attributeSets.TryGetValue(attrSetName, out var set) ? set[attrShortName].BaseValue : (LFloat?)null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public float? GetAttributeCurrentValue(string attrSetName, string attrShortName)
|
public LFloat? GetAttributeCurrentValue(string attrSetName, string attrShortName)
|
||||||
{
|
{
|
||||||
return _attributeSets.TryGetValue(attrSetName, out var set)
|
return _attributeSets.TryGetValue(attrSetName, out var set)
|
||||||
? set[attrShortName].CurrentValue
|
? set[attrShortName].CurrentValue
|
||||||
: (float?)null;
|
: (LFloat?)null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public Dictionary<string, float> Snapshot()
|
public Dictionary<string, LFloat> Snapshot()
|
||||||
{
|
{
|
||||||
var snapshot = JexGasObjectPool.Instance.Fetch<Dictionary<string, float>>();
|
var snapshot = JexGasObjectPool.Instance.Fetch<Dictionary<string, LFloat>>();
|
||||||
foreach (var kv in _attributeSets)
|
foreach (var kv in _attributeSets)
|
||||||
{
|
{
|
||||||
var attributeSet = kv.Value;
|
var attributeSet = kv.Value;
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using GAS.General;
|
using GAS.General;
|
||||||
|
using JNGame.Math;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace GAS.Runtime
|
namespace GAS.Runtime
|
||||||
@ -270,13 +271,13 @@ namespace GAS.Runtime
|
|||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
public float? GetAttributeCurrentValue(string setName, string attributeShortName)
|
public LFloat? GetAttributeCurrentValue(string setName, string attributeShortName)
|
||||||
{
|
{
|
||||||
var value = AttributeSetContainer.GetAttributeCurrentValue(setName, attributeShortName);
|
var value = AttributeSetContainer.GetAttributeCurrentValue(setName, attributeShortName);
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
public float? GetAttributeBaseValue(string setName, string attributeShortName)
|
public LFloat? GetAttributeBaseValue(string setName, string attributeShortName)
|
||||||
{
|
{
|
||||||
var value = AttributeSetContainer.GetAttributeBaseValue(setName, attributeShortName);
|
var value = AttributeSetContainer.GetAttributeBaseValue(setName, attributeShortName);
|
||||||
return value;
|
return value;
|
||||||
@ -288,7 +289,7 @@ namespace GAS.Runtime
|
|||||||
GameplayEffectContainer.Tick(dt);
|
GameplayEffectContainer.Tick(dt);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Dictionary<string, float> DataSnapshot()
|
public Dictionary<string, LFloat> DataSnapshot()
|
||||||
{
|
{
|
||||||
return AttributeSetContainer.Snapshot();
|
return AttributeSetContainer.Snapshot();
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using JNGame.Math;
|
||||||
|
|
||||||
namespace GAS.Runtime
|
namespace GAS.Runtime
|
||||||
{
|
{
|
||||||
@ -33,14 +34,14 @@ namespace GAS.Runtime
|
|||||||
|
|
||||||
void Tick(int dt);
|
void Tick(int dt);
|
||||||
|
|
||||||
Dictionary<string, float> DataSnapshot();
|
Dictionary<string, LFloat> DataSnapshot();
|
||||||
|
|
||||||
AbilitySpec GrantAbility(AbstractAbility ability);
|
AbilitySpec GrantAbility(AbstractAbility ability);
|
||||||
|
|
||||||
void RemoveAbility(string abilityName);
|
void RemoveAbility(string abilityName);
|
||||||
|
|
||||||
float? GetAttributeCurrentValue(string setName, string attributeShortName);
|
LFloat? GetAttributeCurrentValue(string setName, string attributeShortName);
|
||||||
float? GetAttributeBaseValue(string setName, string attributeShortName);
|
LFloat? GetAttributeBaseValue(string setName, string attributeShortName);
|
||||||
|
|
||||||
bool TryActivateAbility(string abilityName, object arg = null);
|
bool TryActivateAbility(string abilityName, object arg = null);
|
||||||
void TryEndAbility(string abilityName);
|
void TryEndAbility(string abilityName);
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
using System;
|
using System;
|
||||||
|
using JNGame.Math;
|
||||||
|
|
||||||
namespace GAS.Runtime
|
namespace GAS.Runtime
|
||||||
{
|
{
|
||||||
@ -11,13 +12,13 @@ namespace GAS.Runtime
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public sealed class CompositeAttribute
|
public sealed class CompositeAttribute
|
||||||
{
|
{
|
||||||
public float Value { get; private set; }
|
public LFloat Value { get; private set; }
|
||||||
public float MinValue { get; private set; }
|
public LFloat MinValue { get; private set; }
|
||||||
public float MaxValue { get; private set; }
|
public LFloat MaxValue { get; private set; }
|
||||||
|
|
||||||
public delegate float OnPreValueChange(CompositeAttribute compositeAttribute, float oldValue, float newValue);
|
public delegate LFloat OnPreValueChange(CompositeAttribute compositeAttribute, LFloat oldValue, LFloat newValue);
|
||||||
|
|
||||||
public delegate void OnPostValueChange(CompositeAttribute compositeAttribute, float oldValue, float newValue);
|
public delegate void OnPostValueChange(CompositeAttribute compositeAttribute, LFloat oldValue, LFloat newValue);
|
||||||
|
|
||||||
private OnPreValueChange _onPreValueChange;
|
private OnPreValueChange _onPreValueChange;
|
||||||
private event OnPostValueChange _onPostValueChange;
|
private event OnPostValueChange _onPostValueChange;
|
||||||
@ -55,12 +56,12 @@ namespace GAS.Runtime
|
|||||||
/// <param name="maxValue">最大值</param>
|
/// <param name="maxValue">最大值</param>
|
||||||
public CompositeAttribute(
|
public CompositeAttribute(
|
||||||
AttributeBase @base,
|
AttributeBase @base,
|
||||||
|
LFloat minValue,
|
||||||
|
LFloat maxValue,
|
||||||
AttributeBase baseAdditiveBonus = null,
|
AttributeBase baseAdditiveBonus = null,
|
||||||
AttributeBase additiveBonus = null,
|
AttributeBase additiveBonus = null,
|
||||||
AttributeBase multiplicativeBonus = null,
|
AttributeBase multiplicativeBonus = null,
|
||||||
AttributeBase maxValuePenalty = null,
|
AttributeBase maxValuePenalty = null)
|
||||||
float minValue = float.MinValue,
|
|
||||||
float maxValue = float.MaxValue)
|
|
||||||
{
|
{
|
||||||
Base = @base;
|
Base = @base;
|
||||||
BaseAdditiveBonus = baseAdditiveBonus;
|
BaseAdditiveBonus = baseAdditiveBonus;
|
||||||
@ -94,23 +95,23 @@ namespace GAS.Runtime
|
|||||||
MaxValuePenalty?.SetOwner(owner);
|
MaxValuePenalty?.SetOwner(owner);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Init(float baseValue) => Base.Init(baseValue);
|
public void Init(LFloat baseValue) => Base.Init(baseValue);
|
||||||
|
|
||||||
public void SetBaseValue(float baseValue) => Base.SetBaseValue(baseValue);
|
public void SetBaseValue(LFloat baseValue) => Base.SetBaseValue(baseValue);
|
||||||
|
|
||||||
public void SetMinValue(float minValue)
|
public void SetMinValue(LFloat minValue)
|
||||||
{
|
{
|
||||||
MinValue = minValue;
|
MinValue = minValue;
|
||||||
Value = CalculateValue();
|
Value = CalculateValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetMaxValue(float maxValue)
|
public void SetMaxValue(LFloat maxValue)
|
||||||
{
|
{
|
||||||
MaxValue = maxValue;
|
MaxValue = maxValue;
|
||||||
Value = CalculateValue();
|
Value = CalculateValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetMinMaxValue(float minValue, float maxValue)
|
public void SetMinMaxValue(LFloat minValue, LFloat maxValue)
|
||||||
{
|
{
|
||||||
MinValue = minValue;
|
MinValue = minValue;
|
||||||
MaxValue = maxValue;
|
MaxValue = maxValue;
|
||||||
@ -154,7 +155,7 @@ namespace GAS.Runtime
|
|||||||
MaxValuePenalty?.UnregisterPostCurrentValueChange(OnAttributeChanged);
|
MaxValuePenalty?.UnregisterPostCurrentValueChange(OnAttributeChanged);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnAttributeChanged(AttributeBase attribute, float attrOldValue, float attrNewValue)
|
private void OnAttributeChanged(AttributeBase attribute, LFloat attrOldValue, LFloat attrNewValue)
|
||||||
{
|
{
|
||||||
var oldValue = Value;
|
var oldValue = Value;
|
||||||
var newValue = CalculateValue();
|
var newValue = CalculateValue();
|
||||||
@ -174,12 +175,12 @@ namespace GAS.Runtime
|
|||||||
_onPostValueChange?.Invoke(this, oldValue, newValue);
|
_onPostValueChange?.Invoke(this, oldValue, newValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
private float CalculateValue()
|
private LFloat CalculateValue()
|
||||||
{
|
{
|
||||||
return CalculateTotalValue(Base, BaseAdditiveBonus, AdditiveBonus, MultiplicativeBonus, MaxValuePenalty);
|
return CalculateTotalValue(Base, BaseAdditiveBonus, AdditiveBonus, MultiplicativeBonus, MaxValuePenalty);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static float CalculateTotalValue(
|
public static LFloat CalculateTotalValue(
|
||||||
AttributeBase @base,
|
AttributeBase @base,
|
||||||
AttributeBase baseAdditiveBonus = null,
|
AttributeBase baseAdditiveBonus = null,
|
||||||
AttributeBase additiveBonus = null,
|
AttributeBase additiveBonus = null,
|
||||||
|
@ -1,8 +1,10 @@
|
|||||||
namespace GAS.Runtime
|
using JNGame.Math;
|
||||||
|
|
||||||
|
namespace GAS.Runtime
|
||||||
{
|
{
|
||||||
public struct CooldownTimer
|
public struct CooldownTimer
|
||||||
{
|
{
|
||||||
public float TimeRemaining;
|
public LFloat TimeRemaining;
|
||||||
public float Duration;
|
public LFloat Duration;
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,6 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using GAS.General;
|
using GAS.General;
|
||||||
|
using JNGame.Math;
|
||||||
using Sirenix.OdinInspector;
|
using Sirenix.OdinInspector;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
@ -38,7 +39,7 @@ namespace GAS.Runtime
|
|||||||
public readonly string GameplayEffectName;
|
public readonly string GameplayEffectName;
|
||||||
public readonly EffectsDurationPolicy DurationPolicy;
|
public readonly EffectsDurationPolicy DurationPolicy;
|
||||||
public readonly int Duration; // -1 represents infinite duration
|
public readonly int Duration; // -1 represents infinite duration
|
||||||
public readonly float Period;
|
public readonly LFloat Period;
|
||||||
public readonly GameplayEffect PeriodExecution;
|
public readonly GameplayEffect PeriodExecution;
|
||||||
public readonly GameplayEffectTagContainer TagContainer;
|
public readonly GameplayEffectTagContainer TagContainer;
|
||||||
|
|
||||||
@ -71,7 +72,7 @@ namespace GAS.Runtime
|
|||||||
public EntityRef<GameplayEffectSpec> CreateSpec(
|
public EntityRef<GameplayEffectSpec> CreateSpec(
|
||||||
AbilitySystemComponent creator,
|
AbilitySystemComponent creator,
|
||||||
AbilitySystemComponent owner,
|
AbilitySystemComponent owner,
|
||||||
float level = 1,
|
LFloat level,
|
||||||
object userData = null)
|
object userData = null)
|
||||||
{
|
{
|
||||||
var spec = JexGasObjectPool.Instance.Fetch<GameplayEffectSpec>();
|
var spec = JexGasObjectPool.Instance.Fetch<GameplayEffectSpec>();
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using GAS.General;
|
using GAS.General;
|
||||||
|
using JNGame.Math;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace GAS.Runtime
|
namespace GAS.Runtime
|
||||||
@ -224,8 +225,8 @@ namespace GAS.Runtime
|
|||||||
|
|
||||||
public CooldownTimer CheckCooldownFromTags(in GameplayTagSet tags)
|
public CooldownTimer CheckCooldownFromTags(in GameplayTagSet tags)
|
||||||
{
|
{
|
||||||
float longestCooldown = 0;
|
LFloat longestCooldown = 0;
|
||||||
float maxDuration = 0;
|
LFloat maxDuration = 0;
|
||||||
|
|
||||||
// Check if the cooldown tag is granted to the player, and if so, capture the remaining duration for that tag
|
// Check if the cooldown tag is granted to the player, and if so, capture the remaining duration for that tag
|
||||||
foreach (var spec in _gameplayEffectSpecs)
|
foreach (var spec in _gameplayEffectSpecs)
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
using UnityEngine;
|
using JNGame.Math;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
namespace GAS.Runtime
|
namespace GAS.Runtime
|
||||||
{
|
{
|
||||||
@ -6,7 +7,7 @@ namespace GAS.Runtime
|
|||||||
{
|
{
|
||||||
public ulong InstanceId { get; private set; }
|
public ulong InstanceId { get; private set; }
|
||||||
|
|
||||||
private float _periodRemaining;
|
private LFloat _periodRemaining;
|
||||||
private GameplayEffectSpec _spec;
|
private GameplayEffectSpec _spec;
|
||||||
|
|
||||||
public void Awake(GameplayEffectSpec spec)
|
public void Awake(GameplayEffectSpec spec)
|
||||||
@ -23,7 +24,7 @@ namespace GAS.Runtime
|
|||||||
_periodRemaining = default;
|
_periodRemaining = default;
|
||||||
}
|
}
|
||||||
|
|
||||||
private float Period => _spec.GameplayEffect.Period;
|
private LFloat Period => _spec.GameplayEffect.Period;
|
||||||
|
|
||||||
public void Tick(int dt)
|
public void Tick(int dt)
|
||||||
{
|
{
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using GAS.General;
|
using GAS.General;
|
||||||
|
using JNGame.Math;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace GAS.Runtime
|
namespace GAS.Runtime
|
||||||
@ -10,8 +11,8 @@ namespace GAS.Runtime
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public sealed class GameplayEffectSpec : IEntity, IPool
|
public sealed class GameplayEffectSpec : IEntity, IPool
|
||||||
{
|
{
|
||||||
private Dictionary<GameplayTag, float> _valueMapWithTag;
|
private Dictionary<GameplayTag, LFloat> _valueMapWithTag;
|
||||||
private Dictionary<string, float> _valueMapWithName;
|
private Dictionary<string, LFloat> _valueMapWithName;
|
||||||
private List<GameplayCueDurationalSpec> _cueDurationalSpecs;
|
private List<GameplayCueDurationalSpec> _cueDurationalSpecs;
|
||||||
|
|
||||||
public object UserData { get; set; }
|
public object UserData { get; set; }
|
||||||
@ -131,7 +132,7 @@ namespace GAS.Runtime
|
|||||||
JexGasObjectPool.Instance.Recycle(this);
|
JexGasObjectPool.Instance.Recycle(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Init(AbilitySystemComponent source, AbilitySystemComponent owner, float level = 1)
|
public void Init(AbilitySystemComponent source, AbilitySystemComponent owner, LFloat level)
|
||||||
{
|
{
|
||||||
Source = source;
|
Source = source;
|
||||||
Owner = owner;
|
Owner = owner;
|
||||||
@ -140,7 +141,8 @@ namespace GAS.Runtime
|
|||||||
{
|
{
|
||||||
if (GameplayEffect.PeriodExecution is not null)
|
if (GameplayEffect.PeriodExecution is not null)
|
||||||
{
|
{
|
||||||
PeriodExecution = GameplayEffect.PeriodExecution.CreateSpec(source, owner);
|
//TODO 不知道为什么没有传Level
|
||||||
|
PeriodExecution = GameplayEffect.PeriodExecution.CreateSpec(source, owner,1);
|
||||||
}
|
}
|
||||||
|
|
||||||
SetGrantedAbility(GameplayEffect.GrantedAbilities);
|
SetGrantedAbility(GameplayEffect.GrantedAbilities);
|
||||||
@ -151,7 +153,7 @@ namespace GAS.Runtime
|
|||||||
|
|
||||||
public GameplayEffect GameplayEffect { get; private set; }
|
public GameplayEffect GameplayEffect { get; private set; }
|
||||||
public int ActivationTime { get; private set; }
|
public int ActivationTime { get; private set; }
|
||||||
public float Level { get; private set; }
|
public LFloat Level { get; private set; }
|
||||||
public AbilitySystemComponent Source { get; private set; }
|
public AbilitySystemComponent Source { get; private set; }
|
||||||
public AbilitySystemComponent Owner { get; private set; }
|
public AbilitySystemComponent Owner { get; private set; }
|
||||||
public bool IsApplied { get; private set; }
|
public bool IsApplied { get; private set; }
|
||||||
@ -165,23 +167,23 @@ namespace GAS.Runtime
|
|||||||
public GameplayEffectStacking Stacking { get; private set; }
|
public GameplayEffectStacking Stacking { get; private set; }
|
||||||
|
|
||||||
public GameplayEffectSnapshotPolicy SnapshotPolicy => GameplayEffect.SnapshotPolicy;
|
public GameplayEffectSnapshotPolicy SnapshotPolicy => GameplayEffect.SnapshotPolicy;
|
||||||
public Dictionary<string, float> SnapshotSourceAttributes { get; private set; }
|
public Dictionary<string, LFloat> SnapshotSourceAttributes { get; private set; }
|
||||||
public Dictionary<string, float> SnapshotTargetAttributes { get; private set; }
|
public Dictionary<string, LFloat> SnapshotTargetAttributes { get; private set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 堆叠数
|
/// 堆叠数
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public int StackCount { get; private set; } = 1;
|
public int StackCount { get; private set; } = 1;
|
||||||
|
|
||||||
public float DurationRemaining()
|
public LFloat DurationRemaining()
|
||||||
{
|
{
|
||||||
if (DurationPolicy == EffectsDurationPolicy.Infinite)
|
if (DurationPolicy == EffectsDurationPolicy.Infinite)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
return Mathf.Max(0, Duration - ActivationTime);
|
return LMath.Max(0, Duration - ActivationTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetLevel(float level)
|
public void SetLevel(LFloat level)
|
||||||
{
|
{
|
||||||
Level = level;
|
Level = level;
|
||||||
}
|
}
|
||||||
@ -487,7 +489,7 @@ namespace GAS.Runtime
|
|||||||
{
|
{
|
||||||
case GameplayEffectSpecifiedSnapshotConfig.ESnapshotTarget.Source:
|
case GameplayEffectSpecifiedSnapshotConfig.ESnapshotTarget.Source:
|
||||||
{
|
{
|
||||||
SnapshotSourceAttributes ??= JexGasObjectPool.Instance.Fetch<Dictionary<string, float>>();
|
SnapshotSourceAttributes ??= JexGasObjectPool.Instance.Fetch<Dictionary<string, LFloat>>();
|
||||||
var attribute = Source.AttributeSetContainer.GetAttributeAttributeValue(config.AttributeSetName, config.AttributeShortName);
|
var attribute = Source.AttributeSetContainer.GetAttributeAttributeValue(config.AttributeSetName, config.AttributeShortName);
|
||||||
if (attribute != null)
|
if (attribute != null)
|
||||||
{
|
{
|
||||||
@ -502,7 +504,7 @@ namespace GAS.Runtime
|
|||||||
}
|
}
|
||||||
case GameplayEffectSpecifiedSnapshotConfig.ESnapshotTarget.Target:
|
case GameplayEffectSpecifiedSnapshotConfig.ESnapshotTarget.Target:
|
||||||
{
|
{
|
||||||
SnapshotTargetAttributes ??= JexGasObjectPool.Instance.Fetch<Dictionary<string, float>>();
|
SnapshotTargetAttributes ??= JexGasObjectPool.Instance.Fetch<Dictionary<string, LFloat>>();
|
||||||
var attribute = Owner.AttributeSetContainer.GetAttributeAttributeValue(config.AttributeSetName, config.AttributeShortName);
|
var attribute = Owner.AttributeSetContainer.GetAttributeAttributeValue(config.AttributeSetName, config.AttributeShortName);
|
||||||
if (attribute != null)
|
if (attribute != null)
|
||||||
{
|
{
|
||||||
@ -538,15 +540,15 @@ namespace GAS.Runtime
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void RegisterValue(in GameplayTag tag, float value)
|
public void RegisterValue(in GameplayTag tag, LFloat value)
|
||||||
{
|
{
|
||||||
_valueMapWithTag ??= JexGasObjectPool.Instance.Fetch<Dictionary<GameplayTag, float>>();
|
_valueMapWithTag ??= JexGasObjectPool.Instance.Fetch<Dictionary<GameplayTag, LFloat>>();
|
||||||
_valueMapWithTag[tag] = value;
|
_valueMapWithTag[tag] = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void RegisterValue(string name, float value)
|
public void RegisterValue(string name, LFloat value)
|
||||||
{
|
{
|
||||||
_valueMapWithName ??= JexGasObjectPool.Instance.Fetch<Dictionary<string, float>>();
|
_valueMapWithName ??= JexGasObjectPool.Instance.Fetch<Dictionary<string, LFloat>>();
|
||||||
_valueMapWithName[name] = value;
|
_valueMapWithName[name] = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -562,16 +564,16 @@ namespace GAS.Runtime
|
|||||||
return _valueMapWithName.Remove(name);
|
return _valueMapWithName.Remove(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
public float? GetMapValue(in GameplayTag tag)
|
public LFloat? GetMapValue(in GameplayTag tag)
|
||||||
{
|
{
|
||||||
if (_valueMapWithTag == null) return null;
|
if (_valueMapWithTag == null) return null;
|
||||||
return _valueMapWithTag.TryGetValue(tag, out var value) ? value : (float?)null;
|
return _valueMapWithTag.TryGetValue(tag, out var value) ? value : (LFloat?)null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public float? GetMapValue(string name)
|
public LFloat? GetMapValue(string name)
|
||||||
{
|
{
|
||||||
if (_valueMapWithName == null) return null;
|
if (_valueMapWithName == null) return null;
|
||||||
return _valueMapWithName.TryGetValue(name, out var value) ? value : (float?)null;
|
return _valueMapWithName.TryGetValue(name, out var value) ? value : (LFloat?)null;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void TryActivateGrantedAbilities()
|
private void TryActivateGrantedAbilities()
|
||||||
@ -640,7 +642,7 @@ namespace GAS.Runtime
|
|||||||
if (stackCount <= Stacking.limitCount)
|
if (stackCount <= Stacking.limitCount)
|
||||||
{
|
{
|
||||||
// 更新栈数
|
// 更新栈数
|
||||||
StackCount = Mathf.Max(1, stackCount); // 最小层数为1
|
StackCount = LMath.Max(1, stackCount); // 最小层数为1
|
||||||
// 是否刷新Duration
|
// 是否刷新Duration
|
||||||
if (Stacking.durationRefreshPolicy == DurationRefreshPolicy.RefreshOnSuccessfulApplication)
|
if (Stacking.durationRefreshPolicy == DurationRefreshPolicy.RefreshOnSuccessfulApplication)
|
||||||
{
|
{
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
using JNGame.Math;
|
||||||
using Sirenix.OdinInspector;
|
using Sirenix.OdinInspector;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
@ -19,11 +20,11 @@ namespace GAS.Runtime
|
|||||||
[TabGroup("Default", "AttributeBasedModCalculation")]
|
[TabGroup("Default", "AttributeBasedModCalculation")]
|
||||||
[Title("堆叠幅值计算")]
|
[Title("堆叠幅值计算")]
|
||||||
[LabelText("系数(sK)")]
|
[LabelText("系数(sK)")]
|
||||||
public float sK = 1;
|
public LFloat sK = 1;
|
||||||
|
|
||||||
[TabGroup("Default", "AttributeBasedModCalculation")]
|
[TabGroup("Default", "AttributeBasedModCalculation")]
|
||||||
[LabelText("常量(sB)")]
|
[LabelText("常量(sB)")]
|
||||||
public float sB = 0;
|
public LFloat sB = 0;
|
||||||
|
|
||||||
[TabGroup("Default", "AttributeBasedModCalculation")]
|
[TabGroup("Default", "AttributeBasedModCalculation")]
|
||||||
[Title("最终结果")]
|
[Title("最终结果")]
|
||||||
@ -52,7 +53,7 @@ namespace GAS.Runtime
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public override float CalculateMagnitude(GameplayEffectSpec spec, float modifierMagnitude)
|
public override LFloat CalculateMagnitude(GameplayEffectSpec spec, LFloat modifierMagnitude)
|
||||||
{
|
{
|
||||||
var attrMagnitude = base.CalculateMagnitude(spec, modifierMagnitude);
|
var attrMagnitude = base.CalculateMagnitude(spec, modifierMagnitude);
|
||||||
|
|
||||||
|
@ -52,7 +52,7 @@ namespace GAS.Runtime
|
|||||||
[ReadOnly]
|
[ReadOnly]
|
||||||
public string attributeShortName;
|
public string attributeShortName;
|
||||||
|
|
||||||
[InfoBox("计算逻辑与ScalableFloatModCalculation一致, 公式:AttributeValue * k + b")]
|
[InfoBox("计算逻辑与ScalableLFloatModCalculation一致, 公式:AttributeValue * k + b")]
|
||||||
[TabGroup("Default", "AttributeBasedModCalculation")]
|
[TabGroup("Default", "AttributeBasedModCalculation")]
|
||||||
[LabelText("系数(k)")]
|
[LabelText("系数(k)")]
|
||||||
public LFloat k = 1;
|
public LFloat k = 1;
|
||||||
@ -61,9 +61,9 @@ namespace GAS.Runtime
|
|||||||
[LabelText("常量(b)")]
|
[LabelText("常量(b)")]
|
||||||
public LFloat b = 0;
|
public LFloat b = 0;
|
||||||
|
|
||||||
public override float CalculateMagnitude(GameplayEffectSpec spec, float modifierMagnitude)
|
public override LFloat CalculateMagnitude(GameplayEffectSpec spec, LFloat modifierMagnitude)
|
||||||
{
|
{
|
||||||
float attributeValue;
|
LFloat attributeValue;
|
||||||
if (attributeFromType == AttributeFrom.Source)
|
if (attributeFromType == AttributeFrom.Source)
|
||||||
{
|
{
|
||||||
if (captureType == GEAttributeCaptureType.SnapShot)
|
if (captureType == GEAttributeCaptureType.SnapShot)
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
using System;
|
using System;
|
||||||
|
using JNGame.Math;
|
||||||
using Sirenix.OdinInspector;
|
using Sirenix.OdinInspector;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
@ -69,9 +70,9 @@ namespace GAS.Runtime
|
|||||||
[LabelText("运算参数", SdfIconType.Activity)]
|
[LabelText("运算参数", SdfIconType.Activity)]
|
||||||
[LabelWidth(LABEL_WIDTH)]
|
[LabelWidth(LABEL_WIDTH)]
|
||||||
[Tooltip("修改器的基础数值。这个数值如何使用由MMC的运行逻辑决定。\nMMC未指定时直接使用这个值。")]
|
[Tooltip("修改器的基础数值。这个数值如何使用由MMC的运行逻辑决定。\nMMC未指定时直接使用这个值。")]
|
||||||
[ValidateInput("@Operation != GEOperation.Divide || ModiferMagnitude != 0", "除数不能为零")]
|
// [ValidateInput("@Operation != GEOperation.Divide || ModiferMagnitude != 0", "除数不能为零")]
|
||||||
[PropertyOrder(3)]
|
[PropertyOrder(3)]
|
||||||
public float ModiferMagnitude;
|
public LFloat ModiferMagnitude;
|
||||||
|
|
||||||
[LabelText("运算法则", SdfIconType.PlusSlashMinus)]
|
[LabelText("运算法则", SdfIconType.PlusSlashMinus)]
|
||||||
[LabelWidth(LABEL_WIDTH)]
|
[LabelWidth(LABEL_WIDTH)]
|
||||||
@ -95,7 +96,7 @@ namespace GAS.Runtime
|
|||||||
|
|
||||||
public GameplayEffectModifier(
|
public GameplayEffectModifier(
|
||||||
string attributeName,
|
string attributeName,
|
||||||
float modiferMagnitude,
|
LFloat modiferMagnitude,
|
||||||
GEOperation operation,
|
GEOperation operation,
|
||||||
ModifierMagnitudeCalculation mmc = null)
|
ModifierMagnitudeCalculation mmc = null)
|
||||||
{
|
{
|
||||||
@ -108,12 +109,12 @@ namespace GAS.Runtime
|
|||||||
MMC = mmc;
|
MMC = mmc;
|
||||||
}
|
}
|
||||||
|
|
||||||
public float CalculateMagnitude(GameplayEffectSpec spec, float modifierMagnitude)
|
public LFloat CalculateMagnitude(GameplayEffectSpec spec, LFloat modifierMagnitude)
|
||||||
{
|
{
|
||||||
return MMC == null ? ModiferMagnitude : MMC.CalculateMagnitude(spec, modifierMagnitude);
|
return MMC == null ? ModiferMagnitude : MMC.CalculateMagnitude(spec, modifierMagnitude);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetModiferMagnitude(float value)
|
public void SetModiferMagnitude(LFloat value)
|
||||||
{
|
{
|
||||||
ModiferMagnitude = value;
|
ModiferMagnitude = value;
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using GAS.General;
|
using GAS.General;
|
||||||
|
using JNGame.Math;
|
||||||
using Sirenix.OdinInspector;
|
using Sirenix.OdinInspector;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
@ -41,7 +42,7 @@ namespace GAS.Runtime
|
|||||||
public string[] InheritanceChain => GetType().GetInheritanceChain().Reverse().ToArray();
|
public string[] InheritanceChain => GetType().GetInheritanceChain().Reverse().ToArray();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
public abstract float CalculateMagnitude(GameplayEffectSpec spec, float modifierMagnitude);
|
public abstract LFloat CalculateMagnitude(GameplayEffectSpec spec, LFloat modifierMagnitude);
|
||||||
|
|
||||||
#if UNITY_EDITOR
|
#if UNITY_EDITOR
|
||||||
private void OnValidate()
|
private void OnValidate()
|
||||||
|
@ -1,22 +1,23 @@
|
|||||||
using Sirenix.OdinInspector;
|
using JNGame.Math;
|
||||||
|
using Sirenix.OdinInspector;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace GAS.Runtime
|
namespace GAS.Runtime
|
||||||
{
|
{
|
||||||
[CreateAssetMenu(fileName = "ScalableFloatModCalculation", menuName = "GAS/MMC/ScalableFloatModCalculation")]
|
[CreateAssetMenu(fileName = "ScalableLFloatModCalculation", menuName = "GAS/MMC/ScalableLFloatModCalculation")]
|
||||||
public class ScalableFloatModCalculation : ModifierMagnitudeCalculation
|
public class ScalableLFloatModCalculation : ModifierMagnitudeCalculation
|
||||||
{
|
{
|
||||||
private const string Desc = "计算公式:ModifierMagnitude * k + b";
|
private const string Desc = "计算公式:ModifierMagnitude * k + b";
|
||||||
|
|
||||||
private const string Detail =
|
private const string Detail =
|
||||||
"ScalableFloatModCalculation:可缩放浮点数计算\n该类型是根据Magnitude计算Modifier模值的,计算公式为:ModifierMagnitude * k + b 实际上就是一个线性函数,k和b为可编辑参数,可以在编辑器中设置。";
|
"ScalableLFloatModCalculation:可缩放浮点数计算\n该类型是根据Magnitude计算Modifier模值的,计算公式为:ModifierMagnitude * k + b 实际上就是一个线性函数,k和b为可编辑参数,可以在编辑器中设置。";
|
||||||
|
|
||||||
[DetailedInfoBox(Desc, Detail, InfoMessageType.Info)] [SerializeField]
|
[DetailedInfoBox(Desc, Detail, InfoMessageType.Info)] [SerializeField]
|
||||||
private float k = 1f;
|
private LFloat k = LFloat.L1;
|
||||||
|
|
||||||
[SerializeField] private float b = 0f;
|
[SerializeField] private LFloat b = LFloat.L0;
|
||||||
|
|
||||||
public override float CalculateMagnitude(GameplayEffectSpec spec, float input)
|
public override LFloat CalculateMagnitude(GameplayEffectSpec spec, LFloat input)
|
||||||
{
|
{
|
||||||
return input * k + b;
|
return input * k + b;
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
using JNGame.Math;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace GAS.Runtime
|
namespace GAS.Runtime
|
||||||
@ -6,7 +7,7 @@ namespace GAS.Runtime
|
|||||||
public class SetByCallerFromNameModCalculation : ModifierMagnitudeCalculation
|
public class SetByCallerFromNameModCalculation : ModifierMagnitudeCalculation
|
||||||
{
|
{
|
||||||
[SerializeField] private string valueName;
|
[SerializeField] private string valueName;
|
||||||
public override float CalculateMagnitude(GameplayEffectSpec spec,float input)
|
public override LFloat CalculateMagnitude(GameplayEffectSpec spec,LFloat input)
|
||||||
{
|
{
|
||||||
var value = spec.GetMapValue(valueName);
|
var value = spec.GetMapValue(valueName);
|
||||||
#if UNITY_EDITOR
|
#if UNITY_EDITOR
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
using JNGame.Math;
|
||||||
using Sirenix.OdinInspector;
|
using Sirenix.OdinInspector;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
@ -10,7 +11,7 @@ namespace GAS.Runtime
|
|||||||
[ValueDropdown("@ValueDropdownHelper.GameplayTagChoices", HideChildProperties = true)]
|
[ValueDropdown("@ValueDropdownHelper.GameplayTagChoices", HideChildProperties = true)]
|
||||||
private GameplayTag _tag;
|
private GameplayTag _tag;
|
||||||
|
|
||||||
public override float CalculateMagnitude(GameplayEffectSpec spec, float input)
|
public override LFloat CalculateMagnitude(GameplayEffectSpec spec, LFloat input)
|
||||||
{
|
{
|
||||||
var value = spec.GetMapValue(_tag);
|
var value = spec.GetMapValue(_tag);
|
||||||
#if UNITY_EDITOR
|
#if UNITY_EDITOR
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
using Sirenix.OdinInspector;
|
using JNGame.Math;
|
||||||
|
using Sirenix.OdinInspector;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace GAS.Runtime
|
namespace GAS.Runtime
|
||||||
@ -6,16 +7,16 @@ namespace GAS.Runtime
|
|||||||
[CreateAssetMenu( fileName = "StackModCalculation", menuName = "GAS/MMC/StackModCalculation" )]
|
[CreateAssetMenu( fileName = "StackModCalculation", menuName = "GAS/MMC/StackModCalculation" )]
|
||||||
public class StackModCalculation:ModifierMagnitudeCalculation
|
public class StackModCalculation:ModifierMagnitudeCalculation
|
||||||
{
|
{
|
||||||
[InfoBox("计算逻辑与ScalableFloatModCalculation一致, 公式:(StackCount) * k + b")]
|
[InfoBox("计算逻辑与ScalableLFloatModCalculation一致, 公式:(StackCount) * k + b")]
|
||||||
[TabGroup("Default", "StackModCalculation")]
|
[TabGroup("Default", "StackModCalculation")]
|
||||||
[LabelText("系数(k)")]
|
[LabelText("系数(k)")]
|
||||||
public float k = 1;
|
public LFloat k = 1;
|
||||||
|
|
||||||
[TabGroup("Default", "StackModCalculation")]
|
[TabGroup("Default", "StackModCalculation")]
|
||||||
[LabelText("常量(b)")]
|
[LabelText("常量(b)")]
|
||||||
public float b = 0;
|
public LFloat b = 0;
|
||||||
|
|
||||||
public override float CalculateMagnitude(GameplayEffectSpec spec, float modifierMagnitude)
|
public override LFloat CalculateMagnitude(GameplayEffectSpec spec, LFloat modifierMagnitude)
|
||||||
{
|
{
|
||||||
if (spec.Stacking.stackingType == StackingType.None) return 0;
|
if (spec.Stacking.stackingType == StackingType.None) return 0;
|
||||||
|
|
||||||
|
@ -1,11 +1,12 @@
|
|||||||
using System;
|
using System;
|
||||||
|
using JNGame.Math;
|
||||||
|
|
||||||
namespace GAS.Runtime
|
namespace GAS.Runtime
|
||||||
{
|
{
|
||||||
public class AttributeChangedEventArgs : EventArgs
|
public class AttributeChangedEventArgs : EventArgs
|
||||||
{
|
{
|
||||||
public AttributeChangedEventArgs(AbilitySystemComponent owner, AttributeBase attribute, float oldValue,
|
public AttributeChangedEventArgs(AbilitySystemComponent owner, AttributeBase attribute, LFloat oldValue,
|
||||||
float newValue)
|
LFloat newValue)
|
||||||
{
|
{
|
||||||
Owner = owner;
|
Owner = owner;
|
||||||
Attribute = attribute;
|
Attribute = attribute;
|
||||||
@ -15,13 +16,13 @@ namespace GAS.Runtime
|
|||||||
|
|
||||||
public AbilitySystemComponent Owner { get; }
|
public AbilitySystemComponent Owner { get; }
|
||||||
public AttributeBase Attribute { get; }
|
public AttributeBase Attribute { get; }
|
||||||
public float OldValue { get; }
|
public LFloat OldValue { get; }
|
||||||
public float NewValue { get; }
|
public LFloat NewValue { get; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class AttributeChangedEvent:EventBase<AttributeChangedEventArgs>
|
public class AttributeChangedEvent:EventBase<AttributeChangedEventArgs>
|
||||||
{
|
{
|
||||||
public void Publish(AbilitySystemComponent owner, AttributeBase attribute, float oldValue, float newValue)
|
public void Publish(AbilitySystemComponent owner, AttributeBase attribute, LFloat oldValue, LFloat newValue)
|
||||||
{
|
{
|
||||||
Publish(new AttributeChangedEventArgs(owner, attribute, oldValue, newValue));
|
Publish(new AttributeChangedEventArgs(owner, attribute, oldValue, newValue));
|
||||||
}
|
}
|
||||||
|
@ -20,17 +20,17 @@ GameplayEffectModifier:
|
|||||||
AttributeName:AS_Fight.Health
|
AttributeName:AS_Fight.Health
|
||||||
ModifierMagnitude:50
|
ModifierMagnitude:50
|
||||||
Operation:Add
|
Operation:Add
|
||||||
MMC:ScalableFloatModCalculation -> k=-1,b=0 (下文会介绍ScalableFloatModCalculation的k,b含义)
|
MMC:ScalableLFloatModCalculation -> k=-1,b=0 (下文会介绍ScalableLFloatModCalculation的k,b含义)
|
||||||
```
|
```
|
||||||
|
|
||||||
## MMC的类型
|
## MMC的类型
|
||||||
MMC的基类为抽象类ModifierMagnitudeCalculation,它的子类有以下几种:
|
MMC的基类为抽象类ModifierMagnitudeCalculation,它的子类有以下几种:
|
||||||
- ScalableFloatModCalculation:可缩放浮点数计算
|
- ScalableLFloatModCalculation:可缩放浮点数计算
|
||||||
- 该类型是根据ModifierMagnitude计算Modifier模值的,计算公式为:`ModifierMagnitude * k + b`
|
- 该类型是根据ModifierMagnitude计算Modifier模值的,计算公式为:`ModifierMagnitude * k + b`
|
||||||
实际上就是一个线性函数,k和b为可编辑参数,可以在编辑器中设置。
|
实际上就是一个线性函数,k和b为可编辑参数,可以在编辑器中设置。
|
||||||
- AttributeBasedModCalculation:基于属性的计算
|
- AttributeBasedModCalculation:基于属性的计算
|
||||||
- 该类型是根据属性值计算Modifier模值的,计算公式为:`AttributeValue * k + b`
|
- 该类型是根据属性值计算Modifier模值的,计算公式为:`AttributeValue * k + b`
|
||||||
计算逻辑与ScalableFloatModCalculation一致。
|
计算逻辑与ScalableLFloatModCalculation一致。
|
||||||
- 重点在于属性值的来源,确定属性值来源的参数有3个:
|
- 重点在于属性值的来源,确定属性值来源的参数有3个:
|
||||||
- attributeFromType:属性值从谁身上取?是从游戏效果的来源(创建者),还是目标(拥有者)。
|
- attributeFromType:属性值从谁身上取?是从游戏效果的来源(创建者),还是目标(拥有者)。
|
||||||
- attributeName:属性值的名称,比如战斗属性集里的生命值:AS_Fight.Health
|
- attributeName:属性值的名称,比如战斗属性集里的生命值:AS_Fight.Health
|
||||||
|
@ -133,7 +133,7 @@ PrefabInstance:
|
|||||||
m_Modifications:
|
m_Modifications:
|
||||||
- target: {fileID: 1418229812123219311, guid: 2e5d0c510b71c714aaccc714aca99afc, type: 3}
|
- target: {fileID: 1418229812123219311, guid: 2e5d0c510b71c714aaccc714aca99afc, type: 3}
|
||||||
propertyPath: m_LocalPosition.x
|
propertyPath: m_LocalPosition.x
|
||||||
value: 10
|
value: 0.18867925
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 1418229812123219311, guid: 2e5d0c510b71c714aaccc714aca99afc, type: 3}
|
- target: {fileID: 1418229812123219311, guid: 2e5d0c510b71c714aaccc714aca99afc, type: 3}
|
||||||
propertyPath: m_LocalPosition.y
|
propertyPath: m_LocalPosition.y
|
||||||
|
@ -23,7 +23,8 @@ MonoBehaviour:
|
|||||||
ActivationOwnedTags: []
|
ActivationOwnedTags: []
|
||||||
ActivationRequiredTags: []
|
ActivationRequiredTags: []
|
||||||
ActivationBlockedTags: []
|
ActivationBlockedTags: []
|
||||||
Speed: 1
|
Speed:
|
||||||
|
rawValue: 1000000
|
||||||
ManualEndAbility: 0
|
ManualEndAbility: 0
|
||||||
FrameCount: 60
|
FrameCount: 60
|
||||||
DurationalCues:
|
DurationalCues:
|
||||||
|
@ -32,8 +32,9 @@ MonoBehaviour:
|
|||||||
- AttributeName: AS_BaseAttribute.HP
|
- AttributeName: AS_BaseAttribute.HP
|
||||||
AttributeSetName: AS_BaseAttribute
|
AttributeSetName: AS_BaseAttribute
|
||||||
AttributeShortName: HP
|
AttributeShortName: HP
|
||||||
ModiferMagnitude: 10
|
ModiferMagnitude:
|
||||||
Operation: 3
|
rawValue: 10000000
|
||||||
|
Operation: 0
|
||||||
MMC: {fileID: 11400000, guid: 331222964d02d1349b1a9c717605c8e9, type: 2}
|
MMC: {fileID: 11400000, guid: 331222964d02d1349b1a9c717605c8e9, type: 2}
|
||||||
AssetTags:
|
AssetTags:
|
||||||
- _name: DeBuff
|
- _name: DeBuff
|
||||||
|
@ -23,7 +23,7 @@ namespace Demo.Scripts.GAS.GameplayCue
|
|||||||
|
|
||||||
public override void Trigger()
|
public override void Trigger()
|
||||||
{
|
{
|
||||||
((GAbilitySystemComponent)Owner).Entity.Transform.Scale = new LVector3(LFloat.L05,LFloat.L05,LFloat.L05);
|
((GAbilitySystemComponent)Owner).Entity.Transform.Scale = new LVector3(LFloat.L0D5,LFloat.L0D5,LFloat.L0D5);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -11,7 +11,7 @@ namespace GASSamples.Scripts.GAS.MMC
|
|||||||
[CreateAssetMenu(fileName = "AttrModCalculation", menuName = "GAS/MMC/AttrModCalculation")]
|
[CreateAssetMenu(fileName = "AttrModCalculation", menuName = "GAS/MMC/AttrModCalculation")]
|
||||||
public class AttrModCalculation : ModifierMagnitudeCalculation
|
public class AttrModCalculation : ModifierMagnitudeCalculation
|
||||||
{
|
{
|
||||||
public override float CalculateMagnitude(GameplayEffectSpec spec, float modifierMagnitude)
|
public override LFloat CalculateMagnitude(GameplayEffectSpec spec, LFloat modifierMagnitude)
|
||||||
{
|
{
|
||||||
return modifierMagnitude;
|
return modifierMagnitude;
|
||||||
}
|
}
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using JNGame.Math;
|
||||||
|
|
||||||
namespace GAS.Runtime
|
namespace GAS.Runtime
|
||||||
{
|
{
|
||||||
@ -13,14 +14,14 @@ namespace GAS.Runtime
|
|||||||
#region HP
|
#region HP
|
||||||
|
|
||||||
/// <summary>血量</summary>
|
/// <summary>血量</summary>
|
||||||
public AttributeBase HP { get; } = new("AS_BaseAttribute", "HP", 0f, CalculateMode.Stacking, (SupportedOperation)31, float.MinValue, float.MaxValue);
|
public AttributeBase HP { get; } = new("AS_BaseAttribute", "HP", new LFloat(true,0), LFloat.MinValue, LFloat.MaxValue, CalculateMode.Stacking, (SupportedOperation)31);
|
||||||
|
|
||||||
public void InitHP(float value) => HP.Init(value);
|
public void InitHP(LFloat value) => HP.Init(value);
|
||||||
public void SetCurrentHP(float value) => HP.SetCurrentValue(value);
|
public void SetCurrentHP(LFloat value) => HP.SetCurrentValue(value);
|
||||||
public void SetBaseHP(float value) => HP.SetBaseValue(value);
|
public void SetBaseHP(LFloat value) => HP.SetBaseValue(value);
|
||||||
public void SetMinHP(float value) => HP.SetMinValue(value);
|
public void SetMinHP(LFloat value) => HP.SetMinValue(value);
|
||||||
public void SetMaxHP(float value) => HP.SetMaxValue(value);
|
public void SetMaxHP(LFloat value) => HP.SetMaxValue(value);
|
||||||
public void SetMinMaxHP(float min, float max) => HP.SetMinMaxValue(min, max);
|
public void SetMinMaxHP(LFloat min, LFloat max) => HP.SetMinMaxValue(min, max);
|
||||||
|
|
||||||
#endregion HP
|
#endregion HP
|
||||||
|
|
||||||
|
339
JNFrame2/Logs/AssetImportWorker0.log
Normal file
339
JNFrame2/Logs/AssetImportWorker0.log
Normal file
@ -0,0 +1,339 @@
|
|||||||
|
Using pre-set license
|
||||||
|
Built from '2022.3/china_unity/release' branch; Version is '2022.3.16f1c1 (2f3f1b3bde89) revision 3096347'; Using compiler version '192829333'; Build Type 'Release'
|
||||||
|
OS: 'Windows 11 (10.0.22631) 64bit Core' Language: 'zh' Physical Memory: 16088 MB
|
||||||
|
BatchMode: 1, IsHumanControllingUs: 0, StartBugReporterOnCrash: 0, Is64bit: 1, IsPro: 1
|
||||||
|
|
||||||
|
COMMAND LINE ARGUMENTS:
|
||||||
|
C:\APP\UnityEdit\2022.3.16f1c1\Editor\Unity.exe
|
||||||
|
-adb2
|
||||||
|
-batchMode
|
||||||
|
-noUpm
|
||||||
|
-name
|
||||||
|
AssetImportWorker0
|
||||||
|
-projectPath
|
||||||
|
D:/Jisol/JisolGame/JNFrame2
|
||||||
|
-logFile
|
||||||
|
Logs/AssetImportWorker0.log
|
||||||
|
-srvPort
|
||||||
|
53829
|
||||||
|
Successfully changed project path to: D:/Jisol/JisolGame/JNFrame2
|
||||||
|
D:/Jisol/JisolGame/JNFrame2
|
||||||
|
[UnityMemory] Configuration Parameters - Can be set up in boot.config
|
||||||
|
"memorysetup-bucket-allocator-granularity=16"
|
||||||
|
"memorysetup-bucket-allocator-bucket-count=8"
|
||||||
|
"memorysetup-bucket-allocator-block-size=33554432"
|
||||||
|
"memorysetup-bucket-allocator-block-count=8"
|
||||||
|
"memorysetup-main-allocator-block-size=16777216"
|
||||||
|
"memorysetup-thread-allocator-block-size=16777216"
|
||||||
|
"memorysetup-gfx-main-allocator-block-size=16777216"
|
||||||
|
"memorysetup-gfx-thread-allocator-block-size=16777216"
|
||||||
|
"memorysetup-cache-allocator-block-size=4194304"
|
||||||
|
"memorysetup-typetree-allocator-block-size=2097152"
|
||||||
|
"memorysetup-profiler-bucket-allocator-granularity=16"
|
||||||
|
"memorysetup-profiler-bucket-allocator-bucket-count=8"
|
||||||
|
"memorysetup-profiler-bucket-allocator-block-size=33554432"
|
||||||
|
"memorysetup-profiler-bucket-allocator-block-count=8"
|
||||||
|
"memorysetup-profiler-allocator-block-size=16777216"
|
||||||
|
"memorysetup-profiler-editor-allocator-block-size=1048576"
|
||||||
|
"memorysetup-temp-allocator-size-main=16777216"
|
||||||
|
"memorysetup-job-temp-allocator-block-size=2097152"
|
||||||
|
"memorysetup-job-temp-allocator-block-size-background=1048576"
|
||||||
|
"memorysetup-job-temp-allocator-reduction-small-platforms=262144"
|
||||||
|
"memorysetup-allocator-temp-initial-block-size-main=262144"
|
||||||
|
"memorysetup-allocator-temp-initial-block-size-worker=262144"
|
||||||
|
"memorysetup-temp-allocator-size-background-worker=32768"
|
||||||
|
"memorysetup-temp-allocator-size-job-worker=262144"
|
||||||
|
"memorysetup-temp-allocator-size-preload-manager=33554432"
|
||||||
|
"memorysetup-temp-allocator-size-nav-mesh-worker=65536"
|
||||||
|
"memorysetup-temp-allocator-size-audio-worker=65536"
|
||||||
|
"memorysetup-temp-allocator-size-cloud-worker=32768"
|
||||||
|
"memorysetup-temp-allocator-size-gi-baking-worker=262144"
|
||||||
|
"memorysetup-temp-allocator-size-gfx=262144"
|
||||||
|
Player connection [30536] Host "[IP] 192.168.31.185 [Port] 0 [Flags] 2 [Guid] 3863844702 [EditorId] 3863844702 [Version] 1048832 [Id] WindowsEditor(7,DESKTOP-5RP3AKU) [Debug] 1 [PackageName] WindowsEditor [ProjectName] Editor" joined multi-casting on [225.0.0.222:54997]...
|
||||||
|
|
||||||
|
Player connection [30536] Host "[IP] 192.168.31.185 [Port] 0 [Flags] 2 [Guid] 3863844702 [EditorId] 3863844702 [Version] 1048832 [Id] WindowsEditor(7,DESKTOP-5RP3AKU) [Debug] 1 [PackageName] WindowsEditor [ProjectName] Editor" joined alternative multi-casting on [225.0.0.222:34997]...
|
||||||
|
|
||||||
|
[Physics::Module] Initialized MultithreadedJobDispatcher with 19 workers.
|
||||||
|
Refreshing native plugins compatible for Editor in 108.86 ms, found 3 plugins.
|
||||||
|
Preloading 0 native plugins for Editor in 0.00 ms.
|
||||||
|
Initialize engine version: 2022.3.16f1c1 (2f3f1b3bde89)
|
||||||
|
[Subsystems] Discovering subsystems at path C:/APP/UnityEdit/2022.3.16f1c1/Editor/Data/Resources/UnitySubsystems
|
||||||
|
[Subsystems] Discovering subsystems at path D:/Jisol/JisolGame/JNFrame2/Assets
|
||||||
|
GfxDevice: creating device client; threaded=0; jobified=0
|
||||||
|
Direct3D:
|
||||||
|
Version: Direct3D 11.0 [level 11.1]
|
||||||
|
Renderer: NVIDIA GeForce RTX 3060 Laptop GPU (ID=0x2520)
|
||||||
|
Vendor: NVIDIA
|
||||||
|
VRAM: 5996 MB
|
||||||
|
Driver: 31.0.15.5176
|
||||||
|
Initialize mono
|
||||||
|
Mono path[0] = 'C:/APP/UnityEdit/2022.3.16f1c1/Editor/Data/Managed'
|
||||||
|
Mono path[1] = 'C:/APP/UnityEdit/2022.3.16f1c1/Editor/Data/MonoBleedingEdge/lib/mono/unityjit-win32'
|
||||||
|
Mono config path = 'C:/APP/UnityEdit/2022.3.16f1c1/Editor/Data/MonoBleedingEdge/etc'
|
||||||
|
Using monoOptions --debugger-agent=transport=dt_socket,embedding=1,server=y,suspend=n,address=127.0.0.1:56928
|
||||||
|
Begin MonoManager ReloadAssembly
|
||||||
|
Registering precompiled unity dll's ...
|
||||||
|
Register platform support module: C:/APP/UnityEdit/2022.3.16f1c1/Editor/Data/PlaybackEngines/AndroidPlayer/UnityEditor.Android.Extensions.dll
|
||||||
|
Register platform support module: C:/APP/UnityEdit/2022.3.16f1c1/Editor/Data/PlaybackEngines/WindowsStandaloneSupport/UnityEditor.WindowsStandalone.Extensions.dll
|
||||||
|
Registered in 0.015835 seconds.
|
||||||
|
- Loaded All Assemblies, in 0.394 seconds
|
||||||
|
Native extension for WindowsStandalone target not found
|
||||||
|
Native extension for Android target not found
|
||||||
|
Android Extension - Scanning For ADB Devices 690 ms
|
||||||
|
Mono: successfully reloaded assembly
|
||||||
|
- Finished resetting the current domain, in 0.962 seconds
|
||||||
|
Domain Reload Profiling: 1348ms
|
||||||
|
BeginReloadAssembly (132ms)
|
||||||
|
ExecutionOrderSort (0ms)
|
||||||
|
DisableScriptedObjects (0ms)
|
||||||
|
BackupInstance (0ms)
|
||||||
|
ReleaseScriptingObjects (0ms)
|
||||||
|
CreateAndSetChildDomain (1ms)
|
||||||
|
RebuildCommonClasses (28ms)
|
||||||
|
RebuildNativeTypeToScriptingClass (9ms)
|
||||||
|
initialDomainReloadingComplete (75ms)
|
||||||
|
LoadAllAssembliesAndSetupDomain (141ms)
|
||||||
|
LoadAssemblies (126ms)
|
||||||
|
RebuildTransferFunctionScriptingTraits (0ms)
|
||||||
|
AnalyzeDomain (138ms)
|
||||||
|
TypeCache.Refresh (136ms)
|
||||||
|
TypeCache.ScanAssembly (123ms)
|
||||||
|
ScanForSourceGeneratedMonoScriptInfo (0ms)
|
||||||
|
ResolveRequiredComponents (0ms)
|
||||||
|
FinalizeReload (963ms)
|
||||||
|
ReleaseScriptCaches (0ms)
|
||||||
|
RebuildScriptCaches (0ms)
|
||||||
|
SetupLoadedEditorAssemblies (920ms)
|
||||||
|
LogAssemblyErrors (0ms)
|
||||||
|
InitializePlatformSupportModulesInManaged (790ms)
|
||||||
|
SetLoadedEditorAssemblies (2ms)
|
||||||
|
RefreshPlugins (0ms)
|
||||||
|
BeforeProcessingInitializeOnLoad (2ms)
|
||||||
|
ProcessInitializeOnLoadAttributes (88ms)
|
||||||
|
ProcessInitializeOnLoadMethodAttributes (38ms)
|
||||||
|
AfterProcessingInitializeOnLoad (0ms)
|
||||||
|
EditorAssembliesLoaded (0ms)
|
||||||
|
ExecutionOrderSort2 (0ms)
|
||||||
|
AwakeInstancesAfterBackupRestoration (0ms)
|
||||||
|
========================================================================
|
||||||
|
Worker process is ready to serve import requests
|
||||||
|
Begin MonoManager ReloadAssembly
|
||||||
|
- Loaded All Assemblies, in 1.094 seconds
|
||||||
|
Refreshing native plugins compatible for Editor in 59.61 ms, found 3 plugins.
|
||||||
|
Native extension for WindowsStandalone target not found
|
||||||
|
Native extension for Android target not found
|
||||||
|
Package Manager log level set to [2]
|
||||||
|
[Package Manager] Server::EnsureServerProcessIsRunning -- launch failed, reason: Unity was launched with the -noUpm command-line argument
|
||||||
|
[Package Manager] UpmClient::Send -- Unable to send message (not connected to UPM process).
|
||||||
|
[Package Manager] Cannot connect to Unity Package Manager local server
|
||||||
|
Launched and connected shader compiler UnityShaderCompiler.exe after 0.05 seconds
|
||||||
|
Mono: successfully reloaded assembly
|
||||||
|
- Finished resetting the current domain, in 0.920 seconds
|
||||||
|
Domain Reload Profiling: 2000ms
|
||||||
|
BeginReloadAssembly (150ms)
|
||||||
|
ExecutionOrderSort (0ms)
|
||||||
|
DisableScriptedObjects (4ms)
|
||||||
|
BackupInstance (0ms)
|
||||||
|
ReleaseScriptingObjects (0ms)
|
||||||
|
CreateAndSetChildDomain (18ms)
|
||||||
|
RebuildCommonClasses (27ms)
|
||||||
|
RebuildNativeTypeToScriptingClass (8ms)
|
||||||
|
initialDomainReloadingComplete (67ms)
|
||||||
|
LoadAllAssembliesAndSetupDomain (827ms)
|
||||||
|
LoadAssemblies (668ms)
|
||||||
|
RebuildTransferFunctionScriptingTraits (0ms)
|
||||||
|
AnalyzeDomain (256ms)
|
||||||
|
TypeCache.Refresh (230ms)
|
||||||
|
TypeCache.ScanAssembly (211ms)
|
||||||
|
ScanForSourceGeneratedMonoScriptInfo (18ms)
|
||||||
|
ResolveRequiredComponents (6ms)
|
||||||
|
FinalizeReload (920ms)
|
||||||
|
ReleaseScriptCaches (0ms)
|
||||||
|
RebuildScriptCaches (0ms)
|
||||||
|
SetupLoadedEditorAssemblies (802ms)
|
||||||
|
LogAssemblyErrors (0ms)
|
||||||
|
InitializePlatformSupportModulesInManaged (22ms)
|
||||||
|
SetLoadedEditorAssemblies (3ms)
|
||||||
|
RefreshPlugins (0ms)
|
||||||
|
BeforeProcessingInitializeOnLoad (61ms)
|
||||||
|
ProcessInitializeOnLoadAttributes (406ms)
|
||||||
|
ProcessInitializeOnLoadMethodAttributes (291ms)
|
||||||
|
AfterProcessingInitializeOnLoad (18ms)
|
||||||
|
EditorAssembliesLoaded (0ms)
|
||||||
|
ExecutionOrderSort2 (0ms)
|
||||||
|
AwakeInstancesAfterBackupRestoration (6ms)
|
||||||
|
Shader 'FairyGUI/TextMeshPro/Distance Field': fallback shader 'TextMeshPro/Mobile/Distance Field' not found
|
||||||
|
Shader 'FairyGUI/TextMeshPro/Distance Field': fallback shader 'TextMeshPro/Mobile/Distance Field' not found
|
||||||
|
Refreshing native plugins compatible for Editor in 34.97 ms, found 3 plugins.
|
||||||
|
Preloading 0 native plugins for Editor in 0.00 ms.
|
||||||
|
Unloading 5569 Unused Serialized files (Serialized files now loaded: 0)
|
||||||
|
Unloading 175 unused Assets / (231.0 KB). Loaded Objects now: 6017.
|
||||||
|
Memory consumption went from 210.4 MB to 210.2 MB.
|
||||||
|
Total: 13.986300 ms (FindLiveObjects: 0.346200 ms CreateObjectMapping: 0.163700 ms MarkObjects: 13.228100 ms DeleteObjects: 0.247300 ms)
|
||||||
|
|
||||||
|
AssetImportParameters requested are different than current active one (requested -> active):
|
||||||
|
custom:container-demuxer-ogg: 62fdf1f143b41e24485cea50d1cbac27 ->
|
||||||
|
custom:video-codec-MediaFoundation-h265: 746d11721c4dcdbdad8f713fa42b33f4 ->
|
||||||
|
custom:video-decoder-ogg-theora: a1e56fd34408186e4bbccfd4996cb3dc ->
|
||||||
|
custom:framework-win-MediaFoundation: 216162199b28c13a410421893ffa2e32 ->
|
||||||
|
custom:CustomObjectIndexerAttribute: 43b350a4d6e6d1791af0b5038c4bea17 ->
|
||||||
|
custom:container-demuxer-webm: 4f35f7cbe854078d1ac9338744f61a02 ->
|
||||||
|
custom:scripting/monoscript/fileName/m_generatorPluginAttribute.cs: b059e60ee6785702b3dbf85733765f7f -> bef7912753b2bc58bba0d70946e69a22
|
||||||
|
custom:scripting/monoscript/fileName/m_generatorAttribute.cs: 9a3832caedb205d9d2bd83dcddfd1f7d -> 4d18a73bcdf3c1dd8d7046481e79d093
|
||||||
|
custom:container-muxer-webm: aa71ff27fc2769a1b78a27578f13a17b ->
|
||||||
|
custom:video-decoder-webm-vp8: 9c59270c3fd7afecdb556c50c9e8de78 ->
|
||||||
|
custom:SearchIndexIgnoredProperties: e643bd26f0fe6173181afceb89e7c659 ->
|
||||||
|
custom:AudioImporter_EditorPlatform: d09bf68614088b80899f8185d706f6e7 ->
|
||||||
|
custom:video-encoder-webm-vp8: eb34c28f22e8b96e1ab97ce403110664 ->
|
||||||
|
custom:audio-decoder-ogg-vorbis: bf7c407c2cedff20999df2af8eb42d56 ->
|
||||||
|
custom:scripting/monoscript/fileName/OdinLVector3.cs: 335a14c82456d6f8a32079e834218188 ->
|
||||||
|
custom:audio-encoder-webm-vorbis: bf7c407c2cedff20999df2af8eb42d56 ->
|
||||||
|
custom:scripting/monoscript/fileName/m_generatorPackageAttribute.cs: e10470c8d55ee14386c756ed32808741 -> c0108c2656ca6f9f00b8de673fb8aace
|
||||||
|
========================================================================
|
||||||
|
Received Prepare
|
||||||
|
Begin MonoManager ReloadAssembly
|
||||||
|
- Loaded All Assemblies, in 0.906 seconds
|
||||||
|
Refreshing native plugins compatible for Editor in 36.59 ms, found 3 plugins.
|
||||||
|
Native extension for WindowsStandalone target not found
|
||||||
|
Native extension for Android target not found
|
||||||
|
[Package Manager] Server::EnsureServerProcessIsRunning -- launch failed, reason: Unity was launched with the -noUpm command-line argument
|
||||||
|
[Package Manager] UpmClient::Send -- Unable to send message (not connected to UPM process).
|
||||||
|
[Package Manager] Cannot connect to Unity Package Manager local server
|
||||||
|
Mono: successfully reloaded assembly
|
||||||
|
- Finished resetting the current domain, in 1.913 seconds
|
||||||
|
Domain Reload Profiling: 2802ms
|
||||||
|
BeginReloadAssembly (203ms)
|
||||||
|
ExecutionOrderSort (0ms)
|
||||||
|
DisableScriptedObjects (3ms)
|
||||||
|
BackupInstance (0ms)
|
||||||
|
ReleaseScriptingObjects (0ms)
|
||||||
|
CreateAndSetChildDomain (46ms)
|
||||||
|
RebuildCommonClasses (38ms)
|
||||||
|
RebuildNativeTypeToScriptingClass (11ms)
|
||||||
|
initialDomainReloadingComplete (86ms)
|
||||||
|
LoadAllAssembliesAndSetupDomain (551ms)
|
||||||
|
LoadAssemblies (626ms)
|
||||||
|
RebuildTransferFunctionScriptingTraits (0ms)
|
||||||
|
AnalyzeDomain (37ms)
|
||||||
|
TypeCache.Refresh (21ms)
|
||||||
|
TypeCache.ScanAssembly (10ms)
|
||||||
|
ScanForSourceGeneratedMonoScriptInfo (7ms)
|
||||||
|
ResolveRequiredComponents (8ms)
|
||||||
|
FinalizeReload (1913ms)
|
||||||
|
ReleaseScriptCaches (0ms)
|
||||||
|
RebuildScriptCaches (0ms)
|
||||||
|
SetupLoadedEditorAssemblies (545ms)
|
||||||
|
LogAssemblyErrors (0ms)
|
||||||
|
InitializePlatformSupportModulesInManaged (25ms)
|
||||||
|
SetLoadedEditorAssemblies (3ms)
|
||||||
|
RefreshPlugins (0ms)
|
||||||
|
BeforeProcessingInitializeOnLoad (61ms)
|
||||||
|
ProcessInitializeOnLoadAttributes (256ms)
|
||||||
|
ProcessInitializeOnLoadMethodAttributes (179ms)
|
||||||
|
AfterProcessingInitializeOnLoad (21ms)
|
||||||
|
EditorAssembliesLoaded (0ms)
|
||||||
|
ExecutionOrderSort2 (0ms)
|
||||||
|
AwakeInstancesAfterBackupRestoration (16ms)
|
||||||
|
Shader 'FairyGUI/TextMeshPro/Distance Field': fallback shader 'TextMeshPro/Mobile/Distance Field' not found
|
||||||
|
Shader 'FairyGUI/TextMeshPro/Distance Field': fallback shader 'TextMeshPro/Mobile/Distance Field' not found
|
||||||
|
Refreshing native plugins compatible for Editor in 38.92 ms, found 3 plugins.
|
||||||
|
Preloading 0 native plugins for Editor in 0.00 ms.
|
||||||
|
Unloading 5552 Unused Serialized files (Serialized files now loaded: 0)
|
||||||
|
Unloading 134 unused Assets / (203.5 KB). Loaded Objects now: 6032.
|
||||||
|
Memory consumption went from 208.9 MB to 208.7 MB.
|
||||||
|
Total: 13.355800 ms (FindLiveObjects: 0.384100 ms CreateObjectMapping: 0.189100 ms MarkObjects: 12.555800 ms DeleteObjects: 0.224600 ms)
|
||||||
|
|
||||||
|
Prepare: number of updated asset objects reloaded= 0
|
||||||
|
AssetImportParameters requested are different than current active one (requested -> active):
|
||||||
|
custom:container-demuxer-ogg: 62fdf1f143b41e24485cea50d1cbac27 ->
|
||||||
|
custom:video-codec-MediaFoundation-h265: 746d11721c4dcdbdad8f713fa42b33f4 ->
|
||||||
|
custom:video-decoder-ogg-theora: a1e56fd34408186e4bbccfd4996cb3dc ->
|
||||||
|
custom:framework-win-MediaFoundation: 216162199b28c13a410421893ffa2e32 ->
|
||||||
|
custom:CustomObjectIndexerAttribute: 43b350a4d6e6d1791af0b5038c4bea17 ->
|
||||||
|
custom:container-demuxer-webm: 4f35f7cbe854078d1ac9338744f61a02 ->
|
||||||
|
custom:container-muxer-webm: aa71ff27fc2769a1b78a27578f13a17b ->
|
||||||
|
custom:video-decoder-webm-vp8: 9c59270c3fd7afecdb556c50c9e8de78 ->
|
||||||
|
custom:SearchIndexIgnoredProperties: e643bd26f0fe6173181afceb89e7c659 ->
|
||||||
|
custom:AudioImporter_EditorPlatform: d09bf68614088b80899f8185d706f6e7 ->
|
||||||
|
custom:video-encoder-webm-vp8: eb34c28f22e8b96e1ab97ce403110664 ->
|
||||||
|
custom:audio-decoder-ogg-vorbis: bf7c407c2cedff20999df2af8eb42d56 ->
|
||||||
|
custom:scripting/monoscript/fileName/OdinLVector3.cs: 335a14c82456d6f8a32079e834218188 ->
|
||||||
|
custom:audio-encoder-webm-vorbis: bf7c407c2cedff20999df2af8eb42d56 ->
|
||||||
|
========================================================================
|
||||||
|
Received Import Request.
|
||||||
|
Time since last request: 618241.049248 seconds.
|
||||||
|
path: Assets/Scripts/GASSamples/GAS/Config/GameplayEffectLib/GE_JisolDemo1.asset
|
||||||
|
artifactKey: Guid(25ef9a2206b693c4f9b93af896a038a8) Importer(815301076,1909f56bfc062723c751e8b465ee728b)
|
||||||
|
Start importing Assets/Scripts/GASSamples/GAS/Config/GameplayEffectLib/GE_JisolDemo1.asset using Guid(25ef9a2206b693c4f9b93af896a038a8) Importer(815301076,1909f56bfc062723c751e8b465ee728b) -> (artifact id: '8feb0e18d1eda18ae435bb996a87b853') in 0.012677 seconds
|
||||||
|
Number of updated asset objects reloaded before import = 0
|
||||||
|
Number of asset objects unloaded after import = 4
|
||||||
|
========================================================================
|
||||||
|
Received Prepare
|
||||||
|
Begin MonoManager ReloadAssembly
|
||||||
|
- Loaded All Assemblies, in 0.631 seconds
|
||||||
|
Refreshing native plugins compatible for Editor in 37.39 ms, found 3 plugins.
|
||||||
|
Native extension for WindowsStandalone target not found
|
||||||
|
Native extension for Android target not found
|
||||||
|
[Package Manager] Server::EnsureServerProcessIsRunning -- launch failed, reason: Unity was launched with the -noUpm command-line argument
|
||||||
|
[Package Manager] UpmClient::Send -- Unable to send message (not connected to UPM process).
|
||||||
|
[Package Manager] Cannot connect to Unity Package Manager local server
|
||||||
|
Mono: successfully reloaded assembly
|
||||||
|
- Finished resetting the current domain, in 1.411 seconds
|
||||||
|
Domain Reload Profiling: 2030ms
|
||||||
|
BeginReloadAssembly (165ms)
|
||||||
|
ExecutionOrderSort (0ms)
|
||||||
|
DisableScriptedObjects (3ms)
|
||||||
|
BackupInstance (0ms)
|
||||||
|
ReleaseScriptingObjects (0ms)
|
||||||
|
CreateAndSetChildDomain (43ms)
|
||||||
|
RebuildCommonClasses (25ms)
|
||||||
|
RebuildNativeTypeToScriptingClass (8ms)
|
||||||
|
initialDomainReloadingComplete (62ms)
|
||||||
|
LoadAllAssembliesAndSetupDomain (358ms)
|
||||||
|
LoadAssemblies (426ms)
|
||||||
|
RebuildTransferFunctionScriptingTraits (0ms)
|
||||||
|
AnalyzeDomain (16ms)
|
||||||
|
TypeCache.Refresh (7ms)
|
||||||
|
TypeCache.ScanAssembly (0ms)
|
||||||
|
ScanForSourceGeneratedMonoScriptInfo (0ms)
|
||||||
|
ResolveRequiredComponents (7ms)
|
||||||
|
FinalizeReload (1413ms)
|
||||||
|
ReleaseScriptCaches (0ms)
|
||||||
|
RebuildScriptCaches (0ms)
|
||||||
|
SetupLoadedEditorAssemblies (656ms)
|
||||||
|
LogAssemblyErrors (0ms)
|
||||||
|
InitializePlatformSupportModulesInManaged (30ms)
|
||||||
|
SetLoadedEditorAssemblies (3ms)
|
||||||
|
RefreshPlugins (0ms)
|
||||||
|
BeforeProcessingInitializeOnLoad (74ms)
|
||||||
|
ProcessInitializeOnLoadAttributes (303ms)
|
||||||
|
ProcessInitializeOnLoadMethodAttributes (218ms)
|
||||||
|
AfterProcessingInitializeOnLoad (28ms)
|
||||||
|
EditorAssembliesLoaded (0ms)
|
||||||
|
ExecutionOrderSort2 (0ms)
|
||||||
|
AwakeInstancesAfterBackupRestoration (14ms)
|
||||||
|
Shader 'FairyGUI/TextMeshPro/Distance Field': fallback shader 'TextMeshPro/Mobile/Distance Field' not found
|
||||||
|
Shader 'FairyGUI/TextMeshPro/Distance Field': fallback shader 'TextMeshPro/Mobile/Distance Field' not found
|
||||||
|
Refreshing native plugins compatible for Editor in 41.90 ms, found 3 plugins.
|
||||||
|
Preloading 0 native plugins for Editor in 0.00 ms.
|
||||||
|
Unloading 5551 Unused Serialized files (Serialized files now loaded: 0)
|
||||||
|
Unloading 134 unused Assets / (203.6 KB). Loaded Objects now: 6048.
|
||||||
|
Memory consumption went from 210.6 MB to 210.4 MB.
|
||||||
|
Total: 15.395000 ms (FindLiveObjects: 0.396400 ms CreateObjectMapping: 0.264700 ms MarkObjects: 14.428400 ms DeleteObjects: 0.303800 ms)
|
||||||
|
|
||||||
|
Prepare: number of updated asset objects reloaded= 0
|
||||||
|
AssetImportParameters requested are different than current active one (requested -> active):
|
||||||
|
custom:container-demuxer-ogg: 62fdf1f143b41e24485cea50d1cbac27 ->
|
||||||
|
custom:video-codec-MediaFoundation-h265: 746d11721c4dcdbdad8f713fa42b33f4 ->
|
||||||
|
custom:video-decoder-ogg-theora: a1e56fd34408186e4bbccfd4996cb3dc ->
|
||||||
|
custom:framework-win-MediaFoundation: 216162199b28c13a410421893ffa2e32 ->
|
||||||
|
custom:CustomObjectIndexerAttribute: 43b350a4d6e6d1791af0b5038c4bea17 ->
|
||||||
|
custom:container-demuxer-webm: 4f35f7cbe854078d1ac9338744f61a02 ->
|
||||||
|
custom:container-muxer-webm: aa71ff27fc2769a1b78a27578f13a17b ->
|
||||||
|
custom:video-decoder-webm-vp8: 9c59270c3fd7afecdb556c50c9e8de78 ->
|
||||||
|
custom:SearchIndexIgnoredProperties: e643bd26f0fe6173181afceb89e7c659 ->
|
||||||
|
custom:AudioImporter_EditorPlatform: d09bf68614088b80899f8185d706f6e7 ->
|
||||||
|
custom:video-encoder-webm-vp8: eb34c28f22e8b96e1ab97ce403110664 ->
|
||||||
|
custom:audio-decoder-ogg-vorbis: bf7c407c2cedff20999df2af8eb42d56 ->
|
||||||
|
custom:scripting/monoscript/fileName/OdinLVector3.cs: 335a14c82456d6f8a32079e834218188 ->
|
||||||
|
custom:audio-encoder-webm-vorbis: bf7c407c2cedff20999df2af8eb42d56 ->
|
331
JNFrame2/Logs/AssetImportWorker1.log
Normal file
331
JNFrame2/Logs/AssetImportWorker1.log
Normal file
@ -0,0 +1,331 @@
|
|||||||
|
Using pre-set license
|
||||||
|
Built from '2022.3/china_unity/release' branch; Version is '2022.3.16f1c1 (2f3f1b3bde89) revision 3096347'; Using compiler version '192829333'; Build Type 'Release'
|
||||||
|
OS: 'Windows 11 (10.0.22631) 64bit Core' Language: 'zh' Physical Memory: 16088 MB
|
||||||
|
BatchMode: 1, IsHumanControllingUs: 0, StartBugReporterOnCrash: 0, Is64bit: 1, IsPro: 1
|
||||||
|
|
||||||
|
COMMAND LINE ARGUMENTS:
|
||||||
|
C:\APP\UnityEdit\2022.3.16f1c1\Editor\Unity.exe
|
||||||
|
-adb2
|
||||||
|
-batchMode
|
||||||
|
-noUpm
|
||||||
|
-name
|
||||||
|
AssetImportWorker1
|
||||||
|
-projectPath
|
||||||
|
D:/Jisol/JisolGame/JNFrame2
|
||||||
|
-logFile
|
||||||
|
Logs/AssetImportWorker1.log
|
||||||
|
-srvPort
|
||||||
|
53829
|
||||||
|
Successfully changed project path to: D:/Jisol/JisolGame/JNFrame2
|
||||||
|
D:/Jisol/JisolGame/JNFrame2
|
||||||
|
[UnityMemory] Configuration Parameters - Can be set up in boot.config
|
||||||
|
"memorysetup-bucket-allocator-granularity=16"
|
||||||
|
"memorysetup-bucket-allocator-bucket-count=8"
|
||||||
|
"memorysetup-bucket-allocator-block-size=33554432"
|
||||||
|
"memorysetup-bucket-allocator-block-count=8"
|
||||||
|
"memorysetup-main-allocator-block-size=16777216"
|
||||||
|
"memorysetup-thread-allocator-block-size=16777216"
|
||||||
|
"memorysetup-gfx-main-allocator-block-size=16777216"
|
||||||
|
"memorysetup-gfx-thread-allocator-block-size=16777216"
|
||||||
|
"memorysetup-cache-allocator-block-size=4194304"
|
||||||
|
"memorysetup-typetree-allocator-block-size=2097152"
|
||||||
|
"memorysetup-profiler-bucket-allocator-granularity=16"
|
||||||
|
"memorysetup-profiler-bucket-allocator-bucket-count=8"
|
||||||
|
"memorysetup-profiler-bucket-allocator-block-size=33554432"
|
||||||
|
"memorysetup-profiler-bucket-allocator-block-count=8"
|
||||||
|
"memorysetup-profiler-allocator-block-size=16777216"
|
||||||
|
"memorysetup-profiler-editor-allocator-block-size=1048576"
|
||||||
|
"memorysetup-temp-allocator-size-main=16777216"
|
||||||
|
"memorysetup-job-temp-allocator-block-size=2097152"
|
||||||
|
"memorysetup-job-temp-allocator-block-size-background=1048576"
|
||||||
|
"memorysetup-job-temp-allocator-reduction-small-platforms=262144"
|
||||||
|
"memorysetup-allocator-temp-initial-block-size-main=262144"
|
||||||
|
"memorysetup-allocator-temp-initial-block-size-worker=262144"
|
||||||
|
"memorysetup-temp-allocator-size-background-worker=32768"
|
||||||
|
"memorysetup-temp-allocator-size-job-worker=262144"
|
||||||
|
"memorysetup-temp-allocator-size-preload-manager=33554432"
|
||||||
|
"memorysetup-temp-allocator-size-nav-mesh-worker=65536"
|
||||||
|
"memorysetup-temp-allocator-size-audio-worker=65536"
|
||||||
|
"memorysetup-temp-allocator-size-cloud-worker=32768"
|
||||||
|
"memorysetup-temp-allocator-size-gi-baking-worker=262144"
|
||||||
|
"memorysetup-temp-allocator-size-gfx=262144"
|
||||||
|
Player connection [27260] Host "[IP] 192.168.31.185 [Port] 0 [Flags] 2 [Guid] 520795433 [EditorId] 520795433 [Version] 1048832 [Id] WindowsEditor(7,DESKTOP-5RP3AKU) [Debug] 1 [PackageName] WindowsEditor [ProjectName] Editor" joined multi-casting on [225.0.0.222:54997]...
|
||||||
|
|
||||||
|
Player connection [27260] Host "[IP] 192.168.31.185 [Port] 0 [Flags] 2 [Guid] 520795433 [EditorId] 520795433 [Version] 1048832 [Id] WindowsEditor(7,DESKTOP-5RP3AKU) [Debug] 1 [PackageName] WindowsEditor [ProjectName] Editor" joined alternative multi-casting on [225.0.0.222:34997]...
|
||||||
|
|
||||||
|
[Physics::Module] Initialized MultithreadedJobDispatcher with 19 workers.
|
||||||
|
Refreshing native plugins compatible for Editor in 108.96 ms, found 3 plugins.
|
||||||
|
Preloading 0 native plugins for Editor in 0.00 ms.
|
||||||
|
Initialize engine version: 2022.3.16f1c1 (2f3f1b3bde89)
|
||||||
|
[Subsystems] Discovering subsystems at path C:/APP/UnityEdit/2022.3.16f1c1/Editor/Data/Resources/UnitySubsystems
|
||||||
|
[Subsystems] Discovering subsystems at path D:/Jisol/JisolGame/JNFrame2/Assets
|
||||||
|
GfxDevice: creating device client; threaded=0; jobified=0
|
||||||
|
Direct3D:
|
||||||
|
Version: Direct3D 11.0 [level 11.1]
|
||||||
|
Renderer: NVIDIA GeForce RTX 3060 Laptop GPU (ID=0x2520)
|
||||||
|
Vendor: NVIDIA
|
||||||
|
VRAM: 5996 MB
|
||||||
|
Driver: 31.0.15.5176
|
||||||
|
Initialize mono
|
||||||
|
Mono path[0] = 'C:/APP/UnityEdit/2022.3.16f1c1/Editor/Data/Managed'
|
||||||
|
Mono path[1] = 'C:/APP/UnityEdit/2022.3.16f1c1/Editor/Data/MonoBleedingEdge/lib/mono/unityjit-win32'
|
||||||
|
Mono config path = 'C:/APP/UnityEdit/2022.3.16f1c1/Editor/Data/MonoBleedingEdge/etc'
|
||||||
|
Using monoOptions --debugger-agent=transport=dt_socket,embedding=1,server=y,suspend=n,address=127.0.0.1:56564
|
||||||
|
Begin MonoManager ReloadAssembly
|
||||||
|
Registering precompiled unity dll's ...
|
||||||
|
Register platform support module: C:/APP/UnityEdit/2022.3.16f1c1/Editor/Data/PlaybackEngines/AndroidPlayer/UnityEditor.Android.Extensions.dll
|
||||||
|
Register platform support module: C:/APP/UnityEdit/2022.3.16f1c1/Editor/Data/PlaybackEngines/WindowsStandaloneSupport/UnityEditor.WindowsStandalone.Extensions.dll
|
||||||
|
Registered in 0.016605 seconds.
|
||||||
|
- Loaded All Assemblies, in 0.401 seconds
|
||||||
|
Native extension for WindowsStandalone target not found
|
||||||
|
Native extension for Android target not found
|
||||||
|
Android Extension - Scanning For ADB Devices 690 ms
|
||||||
|
Mono: successfully reloaded assembly
|
||||||
|
- Finished resetting the current domain, in 0.962 seconds
|
||||||
|
Domain Reload Profiling: 1355ms
|
||||||
|
BeginReloadAssembly (135ms)
|
||||||
|
ExecutionOrderSort (0ms)
|
||||||
|
DisableScriptedObjects (0ms)
|
||||||
|
BackupInstance (0ms)
|
||||||
|
ReleaseScriptingObjects (0ms)
|
||||||
|
CreateAndSetChildDomain (1ms)
|
||||||
|
RebuildCommonClasses (30ms)
|
||||||
|
RebuildNativeTypeToScriptingClass (8ms)
|
||||||
|
initialDomainReloadingComplete (76ms)
|
||||||
|
LoadAllAssembliesAndSetupDomain (142ms)
|
||||||
|
LoadAssemblies (125ms)
|
||||||
|
RebuildTransferFunctionScriptingTraits (0ms)
|
||||||
|
AnalyzeDomain (139ms)
|
||||||
|
TypeCache.Refresh (138ms)
|
||||||
|
TypeCache.ScanAssembly (123ms)
|
||||||
|
ScanForSourceGeneratedMonoScriptInfo (0ms)
|
||||||
|
ResolveRequiredComponents (0ms)
|
||||||
|
FinalizeReload (963ms)
|
||||||
|
ReleaseScriptCaches (0ms)
|
||||||
|
RebuildScriptCaches (0ms)
|
||||||
|
SetupLoadedEditorAssemblies (920ms)
|
||||||
|
LogAssemblyErrors (0ms)
|
||||||
|
InitializePlatformSupportModulesInManaged (790ms)
|
||||||
|
SetLoadedEditorAssemblies (2ms)
|
||||||
|
RefreshPlugins (0ms)
|
||||||
|
BeforeProcessingInitializeOnLoad (2ms)
|
||||||
|
ProcessInitializeOnLoadAttributes (88ms)
|
||||||
|
ProcessInitializeOnLoadMethodAttributes (38ms)
|
||||||
|
AfterProcessingInitializeOnLoad (0ms)
|
||||||
|
EditorAssembliesLoaded (0ms)
|
||||||
|
ExecutionOrderSort2 (0ms)
|
||||||
|
AwakeInstancesAfterBackupRestoration (0ms)
|
||||||
|
========================================================================
|
||||||
|
Worker process is ready to serve import requests
|
||||||
|
Begin MonoManager ReloadAssembly
|
||||||
|
- Loaded All Assemblies, in 1.096 seconds
|
||||||
|
Refreshing native plugins compatible for Editor in 57.71 ms, found 3 plugins.
|
||||||
|
Native extension for WindowsStandalone target not found
|
||||||
|
Native extension for Android target not found
|
||||||
|
Package Manager log level set to [2]
|
||||||
|
[Package Manager] Server::EnsureServerProcessIsRunning -- launch failed, reason: Unity was launched with the -noUpm command-line argument
|
||||||
|
[Package Manager] UpmClient::Send -- Unable to send message (not connected to UPM process).
|
||||||
|
[Package Manager] Cannot connect to Unity Package Manager local server
|
||||||
|
Launched and connected shader compiler UnityShaderCompiler.exe after 0.05 seconds
|
||||||
|
Mono: successfully reloaded assembly
|
||||||
|
- Finished resetting the current domain, in 0.921 seconds
|
||||||
|
Domain Reload Profiling: 2003ms
|
||||||
|
BeginReloadAssembly (150ms)
|
||||||
|
ExecutionOrderSort (0ms)
|
||||||
|
DisableScriptedObjects (4ms)
|
||||||
|
BackupInstance (0ms)
|
||||||
|
ReleaseScriptingObjects (0ms)
|
||||||
|
CreateAndSetChildDomain (18ms)
|
||||||
|
RebuildCommonClasses (27ms)
|
||||||
|
RebuildNativeTypeToScriptingClass (8ms)
|
||||||
|
initialDomainReloadingComplete (68ms)
|
||||||
|
LoadAllAssembliesAndSetupDomain (829ms)
|
||||||
|
LoadAssemblies (667ms)
|
||||||
|
RebuildTransferFunctionScriptingTraits (0ms)
|
||||||
|
AnalyzeDomain (259ms)
|
||||||
|
TypeCache.Refresh (234ms)
|
||||||
|
TypeCache.ScanAssembly (213ms)
|
||||||
|
ScanForSourceGeneratedMonoScriptInfo (18ms)
|
||||||
|
ResolveRequiredComponents (6ms)
|
||||||
|
FinalizeReload (921ms)
|
||||||
|
ReleaseScriptCaches (0ms)
|
||||||
|
RebuildScriptCaches (0ms)
|
||||||
|
SetupLoadedEditorAssemblies (807ms)
|
||||||
|
LogAssemblyErrors (0ms)
|
||||||
|
InitializePlatformSupportModulesInManaged (26ms)
|
||||||
|
SetLoadedEditorAssemblies (3ms)
|
||||||
|
RefreshPlugins (0ms)
|
||||||
|
BeforeProcessingInitializeOnLoad (61ms)
|
||||||
|
ProcessInitializeOnLoadAttributes (407ms)
|
||||||
|
ProcessInitializeOnLoadMethodAttributes (291ms)
|
||||||
|
AfterProcessingInitializeOnLoad (18ms)
|
||||||
|
EditorAssembliesLoaded (0ms)
|
||||||
|
ExecutionOrderSort2 (0ms)
|
||||||
|
AwakeInstancesAfterBackupRestoration (6ms)
|
||||||
|
Shader 'FairyGUI/TextMeshPro/Distance Field': fallback shader 'TextMeshPro/Mobile/Distance Field' not found
|
||||||
|
Shader 'FairyGUI/TextMeshPro/Distance Field': fallback shader 'TextMeshPro/Mobile/Distance Field' not found
|
||||||
|
Refreshing native plugins compatible for Editor in 34.81 ms, found 3 plugins.
|
||||||
|
Preloading 0 native plugins for Editor in 0.00 ms.
|
||||||
|
Unloading 5569 Unused Serialized files (Serialized files now loaded: 0)
|
||||||
|
Unloading 175 unused Assets / (231.2 KB). Loaded Objects now: 6017.
|
||||||
|
Memory consumption went from 210.4 MB to 210.2 MB.
|
||||||
|
Total: 13.806200 ms (FindLiveObjects: 0.281700 ms CreateObjectMapping: 0.155000 ms MarkObjects: 13.090200 ms DeleteObjects: 0.278100 ms)
|
||||||
|
|
||||||
|
AssetImportParameters requested are different than current active one (requested -> active):
|
||||||
|
custom:container-demuxer-ogg: 62fdf1f143b41e24485cea50d1cbac27 ->
|
||||||
|
custom:video-codec-MediaFoundation-h265: 746d11721c4dcdbdad8f713fa42b33f4 ->
|
||||||
|
custom:video-decoder-ogg-theora: a1e56fd34408186e4bbccfd4996cb3dc ->
|
||||||
|
custom:framework-win-MediaFoundation: 216162199b28c13a410421893ffa2e32 ->
|
||||||
|
custom:CustomObjectIndexerAttribute: 43b350a4d6e6d1791af0b5038c4bea17 ->
|
||||||
|
custom:container-demuxer-webm: 4f35f7cbe854078d1ac9338744f61a02 ->
|
||||||
|
custom:scripting/monoscript/fileName/m_generatorPluginAttribute.cs: b059e60ee6785702b3dbf85733765f7f -> bef7912753b2bc58bba0d70946e69a22
|
||||||
|
custom:scripting/monoscript/fileName/m_generatorAttribute.cs: 9a3832caedb205d9d2bd83dcddfd1f7d -> 4d18a73bcdf3c1dd8d7046481e79d093
|
||||||
|
custom:container-muxer-webm: aa71ff27fc2769a1b78a27578f13a17b ->
|
||||||
|
custom:video-decoder-webm-vp8: 9c59270c3fd7afecdb556c50c9e8de78 ->
|
||||||
|
custom:SearchIndexIgnoredProperties: e643bd26f0fe6173181afceb89e7c659 ->
|
||||||
|
custom:AudioImporter_EditorPlatform: d09bf68614088b80899f8185d706f6e7 ->
|
||||||
|
custom:video-encoder-webm-vp8: eb34c28f22e8b96e1ab97ce403110664 ->
|
||||||
|
custom:audio-decoder-ogg-vorbis: bf7c407c2cedff20999df2af8eb42d56 ->
|
||||||
|
custom:scripting/monoscript/fileName/OdinLVector3.cs: 335a14c82456d6f8a32079e834218188 ->
|
||||||
|
custom:audio-encoder-webm-vorbis: bf7c407c2cedff20999df2af8eb42d56 ->
|
||||||
|
custom:scripting/monoscript/fileName/m_generatorPackageAttribute.cs: e10470c8d55ee14386c756ed32808741 -> c0108c2656ca6f9f00b8de673fb8aace
|
||||||
|
========================================================================
|
||||||
|
Received Prepare
|
||||||
|
Begin MonoManager ReloadAssembly
|
||||||
|
- Loaded All Assemblies, in 0.900 seconds
|
||||||
|
Refreshing native plugins compatible for Editor in 37.13 ms, found 3 plugins.
|
||||||
|
Native extension for WindowsStandalone target not found
|
||||||
|
Native extension for Android target not found
|
||||||
|
[Package Manager] Server::EnsureServerProcessIsRunning -- launch failed, reason: Unity was launched with the -noUpm command-line argument
|
||||||
|
[Package Manager] UpmClient::Send -- Unable to send message (not connected to UPM process).
|
||||||
|
[Package Manager] Cannot connect to Unity Package Manager local server
|
||||||
|
Mono: successfully reloaded assembly
|
||||||
|
- Finished resetting the current domain, in 1.913 seconds
|
||||||
|
Domain Reload Profiling: 2796ms
|
||||||
|
BeginReloadAssembly (206ms)
|
||||||
|
ExecutionOrderSort (0ms)
|
||||||
|
DisableScriptedObjects (3ms)
|
||||||
|
BackupInstance (0ms)
|
||||||
|
ReleaseScriptingObjects (0ms)
|
||||||
|
CreateAndSetChildDomain (48ms)
|
||||||
|
RebuildCommonClasses (40ms)
|
||||||
|
RebuildNativeTypeToScriptingClass (10ms)
|
||||||
|
initialDomainReloadingComplete (85ms)
|
||||||
|
LoadAllAssembliesAndSetupDomain (542ms)
|
||||||
|
LoadAssemblies (618ms)
|
||||||
|
RebuildTransferFunctionScriptingTraits (0ms)
|
||||||
|
AnalyzeDomain (36ms)
|
||||||
|
TypeCache.Refresh (21ms)
|
||||||
|
TypeCache.ScanAssembly (10ms)
|
||||||
|
ScanForSourceGeneratedMonoScriptInfo (7ms)
|
||||||
|
ResolveRequiredComponents (8ms)
|
||||||
|
FinalizeReload (1914ms)
|
||||||
|
ReleaseScriptCaches (0ms)
|
||||||
|
RebuildScriptCaches (0ms)
|
||||||
|
SetupLoadedEditorAssemblies (551ms)
|
||||||
|
LogAssemblyErrors (0ms)
|
||||||
|
InitializePlatformSupportModulesInManaged (25ms)
|
||||||
|
SetLoadedEditorAssemblies (3ms)
|
||||||
|
RefreshPlugins (0ms)
|
||||||
|
BeforeProcessingInitializeOnLoad (60ms)
|
||||||
|
ProcessInitializeOnLoadAttributes (254ms)
|
||||||
|
ProcessInitializeOnLoadMethodAttributes (187ms)
|
||||||
|
AfterProcessingInitializeOnLoad (21ms)
|
||||||
|
EditorAssembliesLoaded (0ms)
|
||||||
|
ExecutionOrderSort2 (0ms)
|
||||||
|
AwakeInstancesAfterBackupRestoration (9ms)
|
||||||
|
Shader 'FairyGUI/TextMeshPro/Distance Field': fallback shader 'TextMeshPro/Mobile/Distance Field' not found
|
||||||
|
Shader 'FairyGUI/TextMeshPro/Distance Field': fallback shader 'TextMeshPro/Mobile/Distance Field' not found
|
||||||
|
Refreshing native plugins compatible for Editor in 38.75 ms, found 3 plugins.
|
||||||
|
Preloading 0 native plugins for Editor in 0.00 ms.
|
||||||
|
Unloading 5552 Unused Serialized files (Serialized files now loaded: 0)
|
||||||
|
Unloading 134 unused Assets / (203.6 KB). Loaded Objects now: 6032.
|
||||||
|
Memory consumption went from 208.9 MB to 208.7 MB.
|
||||||
|
Total: 13.841200 ms (FindLiveObjects: 0.330300 ms CreateObjectMapping: 0.248000 ms MarkObjects: 12.998900 ms DeleteObjects: 0.262700 ms)
|
||||||
|
|
||||||
|
Prepare: number of updated asset objects reloaded= 0
|
||||||
|
AssetImportParameters requested are different than current active one (requested -> active):
|
||||||
|
custom:container-demuxer-ogg: 62fdf1f143b41e24485cea50d1cbac27 ->
|
||||||
|
custom:video-codec-MediaFoundation-h265: 746d11721c4dcdbdad8f713fa42b33f4 ->
|
||||||
|
custom:video-decoder-ogg-theora: a1e56fd34408186e4bbccfd4996cb3dc ->
|
||||||
|
custom:framework-win-MediaFoundation: 216162199b28c13a410421893ffa2e32 ->
|
||||||
|
custom:CustomObjectIndexerAttribute: 43b350a4d6e6d1791af0b5038c4bea17 ->
|
||||||
|
custom:container-demuxer-webm: 4f35f7cbe854078d1ac9338744f61a02 ->
|
||||||
|
custom:container-muxer-webm: aa71ff27fc2769a1b78a27578f13a17b ->
|
||||||
|
custom:video-decoder-webm-vp8: 9c59270c3fd7afecdb556c50c9e8de78 ->
|
||||||
|
custom:SearchIndexIgnoredProperties: e643bd26f0fe6173181afceb89e7c659 ->
|
||||||
|
custom:AudioImporter_EditorPlatform: d09bf68614088b80899f8185d706f6e7 ->
|
||||||
|
custom:video-encoder-webm-vp8: eb34c28f22e8b96e1ab97ce403110664 ->
|
||||||
|
custom:audio-decoder-ogg-vorbis: bf7c407c2cedff20999df2af8eb42d56 ->
|
||||||
|
custom:scripting/monoscript/fileName/OdinLVector3.cs: 335a14c82456d6f8a32079e834218188 ->
|
||||||
|
custom:audio-encoder-webm-vorbis: bf7c407c2cedff20999df2af8eb42d56 ->
|
||||||
|
========================================================================
|
||||||
|
Received Prepare
|
||||||
|
Begin MonoManager ReloadAssembly
|
||||||
|
- Loaded All Assemblies, in 0.635 seconds
|
||||||
|
Refreshing native plugins compatible for Editor in 37.42 ms, found 3 plugins.
|
||||||
|
Native extension for WindowsStandalone target not found
|
||||||
|
Native extension for Android target not found
|
||||||
|
[Package Manager] Server::EnsureServerProcessIsRunning -- launch failed, reason: Unity was launched with the -noUpm command-line argument
|
||||||
|
[Package Manager] UpmClient::Send -- Unable to send message (not connected to UPM process).
|
||||||
|
[Package Manager] Cannot connect to Unity Package Manager local server
|
||||||
|
Mono: successfully reloaded assembly
|
||||||
|
- Finished resetting the current domain, in 1.413 seconds
|
||||||
|
Domain Reload Profiling: 2034ms
|
||||||
|
BeginReloadAssembly (168ms)
|
||||||
|
ExecutionOrderSort (0ms)
|
||||||
|
DisableScriptedObjects (3ms)
|
||||||
|
BackupInstance (0ms)
|
||||||
|
ReleaseScriptingObjects (0ms)
|
||||||
|
CreateAndSetChildDomain (43ms)
|
||||||
|
RebuildCommonClasses (24ms)
|
||||||
|
RebuildNativeTypeToScriptingClass (8ms)
|
||||||
|
initialDomainReloadingComplete (63ms)
|
||||||
|
LoadAllAssembliesAndSetupDomain (357ms)
|
||||||
|
LoadAssemblies (429ms)
|
||||||
|
RebuildTransferFunctionScriptingTraits (0ms)
|
||||||
|
AnalyzeDomain (15ms)
|
||||||
|
TypeCache.Refresh (6ms)
|
||||||
|
TypeCache.ScanAssembly (0ms)
|
||||||
|
ScanForSourceGeneratedMonoScriptInfo (0ms)
|
||||||
|
ResolveRequiredComponents (7ms)
|
||||||
|
FinalizeReload (1413ms)
|
||||||
|
ReleaseScriptCaches (0ms)
|
||||||
|
RebuildScriptCaches (0ms)
|
||||||
|
SetupLoadedEditorAssemblies (658ms)
|
||||||
|
LogAssemblyErrors (0ms)
|
||||||
|
InitializePlatformSupportModulesInManaged (29ms)
|
||||||
|
SetLoadedEditorAssemblies (3ms)
|
||||||
|
RefreshPlugins (0ms)
|
||||||
|
BeforeProcessingInitializeOnLoad (74ms)
|
||||||
|
ProcessInitializeOnLoadAttributes (305ms)
|
||||||
|
ProcessInitializeOnLoadMethodAttributes (219ms)
|
||||||
|
AfterProcessingInitializeOnLoad (27ms)
|
||||||
|
EditorAssembliesLoaded (0ms)
|
||||||
|
ExecutionOrderSort2 (0ms)
|
||||||
|
AwakeInstancesAfterBackupRestoration (14ms)
|
||||||
|
Shader 'FairyGUI/TextMeshPro/Distance Field': fallback shader 'TextMeshPro/Mobile/Distance Field' not found
|
||||||
|
Shader 'FairyGUI/TextMeshPro/Distance Field': fallback shader 'TextMeshPro/Mobile/Distance Field' not found
|
||||||
|
Refreshing native plugins compatible for Editor in 43.08 ms, found 3 plugins.
|
||||||
|
Preloading 0 native plugins for Editor in 0.00 ms.
|
||||||
|
Unloading 5552 Unused Serialized files (Serialized files now loaded: 0)
|
||||||
|
Unloading 134 unused Assets / (202.8 KB). Loaded Objects now: 6047.
|
||||||
|
Memory consumption went from 210.8 MB to 210.6 MB.
|
||||||
|
Total: 15.860200 ms (FindLiveObjects: 0.350300 ms CreateObjectMapping: 0.218400 ms MarkObjects: 15.055800 ms DeleteObjects: 0.234300 ms)
|
||||||
|
|
||||||
|
Prepare: number of updated asset objects reloaded= 0
|
||||||
|
AssetImportParameters requested are different than current active one (requested -> active):
|
||||||
|
custom:container-demuxer-ogg: 62fdf1f143b41e24485cea50d1cbac27 ->
|
||||||
|
custom:video-codec-MediaFoundation-h265: 746d11721c4dcdbdad8f713fa42b33f4 ->
|
||||||
|
custom:video-decoder-ogg-theora: a1e56fd34408186e4bbccfd4996cb3dc ->
|
||||||
|
custom:framework-win-MediaFoundation: 216162199b28c13a410421893ffa2e32 ->
|
||||||
|
custom:CustomObjectIndexerAttribute: 43b350a4d6e6d1791af0b5038c4bea17 ->
|
||||||
|
custom:container-demuxer-webm: 4f35f7cbe854078d1ac9338744f61a02 ->
|
||||||
|
custom:container-muxer-webm: aa71ff27fc2769a1b78a27578f13a17b ->
|
||||||
|
custom:video-decoder-webm-vp8: 9c59270c3fd7afecdb556c50c9e8de78 ->
|
||||||
|
custom:SearchIndexIgnoredProperties: e643bd26f0fe6173181afceb89e7c659 ->
|
||||||
|
custom:AudioImporter_EditorPlatform: d09bf68614088b80899f8185d706f6e7 ->
|
||||||
|
custom:video-encoder-webm-vp8: eb34c28f22e8b96e1ab97ce403110664 ->
|
||||||
|
custom:audio-decoder-ogg-vorbis: bf7c407c2cedff20999df2af8eb42d56 ->
|
||||||
|
custom:scripting/monoscript/fileName/OdinLVector3.cs: 335a14c82456d6f8a32079e834218188 ->
|
||||||
|
custom:audio-encoder-webm-vorbis: bf7c407c2cedff20999df2af8eb42d56 ->
|
6
JNFrame2/Logs/shadercompiler-AssetImportWorker0.log
Normal file
6
JNFrame2/Logs/shadercompiler-AssetImportWorker0.log
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
Base path: 'C:/APP/UnityEdit/2022.3.16f1c1/Editor/Data', plugins path 'C:/APP/UnityEdit/2022.3.16f1c1/Editor/Data/PlaybackEngines'
|
||||||
|
Cmd: initializeCompiler
|
||||||
|
|
||||||
|
Cmd: preprocess
|
||||||
|
insize=4032 file=/ surfaceOnly=0 buildPlatform=19 validAPIs=295472 pKW=SHADER_API_DESKTOP dKW=UNITY_NO_DXT5nm UNITY_ENABLE_REFLECTION_BUFFERS UNITY_FRAMEBUFFER_FETCH_AVAILABLE UNITY_METAL_SHADOWS_USE_POINT_FILTERING UNITY_NO_SCREENSPACE_SHADOWS UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_PBS_USE_BRDF1 UNITY_PBS_USE_BRDF2 UNITY_PBS_USE_BRDF3 UNITY_NO_FULL_STANDARD_SHADER UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING UNITY_ENABLE_DETAIL_NORMALMAP UNITY_HARDWARE_TIER1 UNITY_HARDWARE_TIER2 UNITY_HARDWARE_TIER3 UNITY_COLORSPACE_GAMMA UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_HALF_PRECISION_FRAGMENT_SHADER_REGISTERS UNITY_LIGHTMAP_DLDR_ENCODING UNITY_LIGHTMAP_RGBM_ENCODING UNITY_LIGHTMAP_FULL_HDR UNITY_VIRTUAL_TEXTURING UNITY_PRETRANSFORM_TO_DISPLAY_ORIENTATION UNITY_ASTC_NORMALMAP_ENCODING SHADER_API_GLES30 UNITY_UNIFIED_SHADER_PRECISION_MODEL ok=1 outsize=195
|
||||||
|
|
@ -10,3 +10,21 @@ Cmd: preprocess
|
|||||||
Cmd: preprocess
|
Cmd: preprocess
|
||||||
insize=1516 file=/ surfaceOnly=0 buildPlatform=19 validAPIs=295472 pKW=SHADER_API_DESKTOP dKW=UNITY_NO_DXT5nm UNITY_ENABLE_REFLECTION_BUFFERS UNITY_FRAMEBUFFER_FETCH_AVAILABLE UNITY_METAL_SHADOWS_USE_POINT_FILTERING UNITY_NO_SCREENSPACE_SHADOWS UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_PBS_USE_BRDF1 UNITY_PBS_USE_BRDF2 UNITY_PBS_USE_BRDF3 UNITY_NO_FULL_STANDARD_SHADER UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING UNITY_ENABLE_DETAIL_NORMALMAP UNITY_HARDWARE_TIER1 UNITY_HARDWARE_TIER2 UNITY_HARDWARE_TIER3 UNITY_COLORSPACE_GAMMA UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_HALF_PRECISION_FRAGMENT_SHADER_REGISTERS UNITY_LIGHTMAP_DLDR_ENCODING UNITY_LIGHTMAP_RGBM_ENCODING UNITY_LIGHTMAP_FULL_HDR UNITY_VIRTUAL_TEXTURING UNITY_PRETRANSFORM_TO_DISPLAY_ORIENTATION UNITY_ASTC_NORMALMAP_ENCODING SHADER_API_GLES30 UNITY_UNIFIED_SHADER_PRECISION_MODEL ok=1 outsize=295
|
insize=1516 file=/ surfaceOnly=0 buildPlatform=19 validAPIs=295472 pKW=SHADER_API_DESKTOP dKW=UNITY_NO_DXT5nm UNITY_ENABLE_REFLECTION_BUFFERS UNITY_FRAMEBUFFER_FETCH_AVAILABLE UNITY_METAL_SHADOWS_USE_POINT_FILTERING UNITY_NO_SCREENSPACE_SHADOWS UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_PBS_USE_BRDF1 UNITY_PBS_USE_BRDF2 UNITY_PBS_USE_BRDF3 UNITY_NO_FULL_STANDARD_SHADER UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING UNITY_ENABLE_DETAIL_NORMALMAP UNITY_HARDWARE_TIER1 UNITY_HARDWARE_TIER2 UNITY_HARDWARE_TIER3 UNITY_COLORSPACE_GAMMA UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_HALF_PRECISION_FRAGMENT_SHADER_REGISTERS UNITY_LIGHTMAP_DLDR_ENCODING UNITY_LIGHTMAP_RGBM_ENCODING UNITY_LIGHTMAP_FULL_HDR UNITY_VIRTUAL_TEXTURING UNITY_PRETRANSFORM_TO_DISPLAY_ORIENTATION UNITY_ASTC_NORMALMAP_ENCODING SHADER_API_GLES30 UNITY_UNIFIED_SHADER_PRECISION_MODEL ok=1 outsize=295
|
||||||
|
|
||||||
|
Cmd: preprocess
|
||||||
|
insize=4032 file=/ surfaceOnly=0 buildPlatform=19 validAPIs=295472 pKW=SHADER_API_DESKTOP dKW=UNITY_NO_DXT5nm UNITY_ENABLE_REFLECTION_BUFFERS UNITY_FRAMEBUFFER_FETCH_AVAILABLE UNITY_METAL_SHADOWS_USE_POINT_FILTERING UNITY_NO_SCREENSPACE_SHADOWS UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_PBS_USE_BRDF1 UNITY_PBS_USE_BRDF2 UNITY_PBS_USE_BRDF3 UNITY_NO_FULL_STANDARD_SHADER UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING UNITY_ENABLE_DETAIL_NORMALMAP UNITY_HARDWARE_TIER1 UNITY_HARDWARE_TIER2 UNITY_HARDWARE_TIER3 UNITY_COLORSPACE_GAMMA UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_HALF_PRECISION_FRAGMENT_SHADER_REGISTERS UNITY_LIGHTMAP_DLDR_ENCODING UNITY_LIGHTMAP_RGBM_ENCODING UNITY_LIGHTMAP_FULL_HDR UNITY_VIRTUAL_TEXTURING UNITY_PRETRANSFORM_TO_DISPLAY_ORIENTATION UNITY_ASTC_NORMALMAP_ENCODING SHADER_API_GLES30 UNITY_UNIFIED_SHADER_PRECISION_MODEL ok=1 outsize=195
|
||||||
|
|
||||||
|
Cmd: preprocess
|
||||||
|
insize=1516 file=/ surfaceOnly=0 buildPlatform=19 validAPIs=295472 pKW=SHADER_API_DESKTOP dKW=UNITY_NO_DXT5nm UNITY_ENABLE_REFLECTION_BUFFERS UNITY_FRAMEBUFFER_FETCH_AVAILABLE UNITY_METAL_SHADOWS_USE_POINT_FILTERING UNITY_NO_SCREENSPACE_SHADOWS UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_PBS_USE_BRDF1 UNITY_PBS_USE_BRDF2 UNITY_PBS_USE_BRDF3 UNITY_NO_FULL_STANDARD_SHADER UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING UNITY_ENABLE_DETAIL_NORMALMAP UNITY_HARDWARE_TIER1 UNITY_HARDWARE_TIER2 UNITY_HARDWARE_TIER3 UNITY_COLORSPACE_GAMMA UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_HALF_PRECISION_FRAGMENT_SHADER_REGISTERS UNITY_LIGHTMAP_DLDR_ENCODING UNITY_LIGHTMAP_RGBM_ENCODING UNITY_LIGHTMAP_FULL_HDR UNITY_VIRTUAL_TEXTURING UNITY_PRETRANSFORM_TO_DISPLAY_ORIENTATION UNITY_ASTC_NORMALMAP_ENCODING SHADER_API_GLES30 UNITY_UNIFIED_SHADER_PRECISION_MODEL ok=1 outsize=295
|
||||||
|
|
||||||
|
Cmd: preprocess
|
||||||
|
insize=4032 file=/ surfaceOnly=0 buildPlatform=19 validAPIs=295472 pKW=SHADER_API_DESKTOP dKW=UNITY_NO_DXT5nm UNITY_ENABLE_REFLECTION_BUFFERS UNITY_FRAMEBUFFER_FETCH_AVAILABLE UNITY_METAL_SHADOWS_USE_POINT_FILTERING UNITY_NO_SCREENSPACE_SHADOWS UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_PBS_USE_BRDF1 UNITY_PBS_USE_BRDF2 UNITY_PBS_USE_BRDF3 UNITY_NO_FULL_STANDARD_SHADER UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING UNITY_ENABLE_DETAIL_NORMALMAP UNITY_HARDWARE_TIER1 UNITY_HARDWARE_TIER2 UNITY_HARDWARE_TIER3 UNITY_COLORSPACE_GAMMA UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_HALF_PRECISION_FRAGMENT_SHADER_REGISTERS UNITY_LIGHTMAP_DLDR_ENCODING UNITY_LIGHTMAP_RGBM_ENCODING UNITY_LIGHTMAP_FULL_HDR UNITY_VIRTUAL_TEXTURING UNITY_PRETRANSFORM_TO_DISPLAY_ORIENTATION UNITY_ASTC_NORMALMAP_ENCODING SHADER_API_GLES30 UNITY_UNIFIED_SHADER_PRECISION_MODEL ok=1 outsize=195
|
||||||
|
|
||||||
|
Cmd: preprocess
|
||||||
|
insize=1516 file=/ surfaceOnly=0 buildPlatform=19 validAPIs=295472 pKW=SHADER_API_DESKTOP dKW=UNITY_NO_DXT5nm UNITY_ENABLE_REFLECTION_BUFFERS UNITY_FRAMEBUFFER_FETCH_AVAILABLE UNITY_METAL_SHADOWS_USE_POINT_FILTERING UNITY_NO_SCREENSPACE_SHADOWS UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_PBS_USE_BRDF1 UNITY_PBS_USE_BRDF2 UNITY_PBS_USE_BRDF3 UNITY_NO_FULL_STANDARD_SHADER UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING UNITY_ENABLE_DETAIL_NORMALMAP UNITY_HARDWARE_TIER1 UNITY_HARDWARE_TIER2 UNITY_HARDWARE_TIER3 UNITY_COLORSPACE_GAMMA UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_HALF_PRECISION_FRAGMENT_SHADER_REGISTERS UNITY_LIGHTMAP_DLDR_ENCODING UNITY_LIGHTMAP_RGBM_ENCODING UNITY_LIGHTMAP_FULL_HDR UNITY_VIRTUAL_TEXTURING UNITY_PRETRANSFORM_TO_DISPLAY_ORIENTATION UNITY_ASTC_NORMALMAP_ENCODING SHADER_API_GLES30 UNITY_UNIFIED_SHADER_PRECISION_MODEL ok=1 outsize=295
|
||||||
|
|
||||||
|
Cmd: preprocess
|
||||||
|
insize=4032 file=/ surfaceOnly=0 buildPlatform=19 validAPIs=295472 pKW=SHADER_API_DESKTOP dKW=UNITY_NO_DXT5nm UNITY_ENABLE_REFLECTION_BUFFERS UNITY_FRAMEBUFFER_FETCH_AVAILABLE UNITY_METAL_SHADOWS_USE_POINT_FILTERING UNITY_NO_SCREENSPACE_SHADOWS UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_PBS_USE_BRDF1 UNITY_PBS_USE_BRDF2 UNITY_PBS_USE_BRDF3 UNITY_NO_FULL_STANDARD_SHADER UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING UNITY_ENABLE_DETAIL_NORMALMAP UNITY_HARDWARE_TIER1 UNITY_HARDWARE_TIER2 UNITY_HARDWARE_TIER3 UNITY_COLORSPACE_GAMMA UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_HALF_PRECISION_FRAGMENT_SHADER_REGISTERS UNITY_LIGHTMAP_DLDR_ENCODING UNITY_LIGHTMAP_RGBM_ENCODING UNITY_LIGHTMAP_FULL_HDR UNITY_VIRTUAL_TEXTURING UNITY_PRETRANSFORM_TO_DISPLAY_ORIENTATION UNITY_ASTC_NORMALMAP_ENCODING SHADER_API_GLES30 UNITY_UNIFIED_SHADER_PRECISION_MODEL ok=1 outsize=195
|
||||||
|
|
||||||
|
Cmd: preprocess
|
||||||
|
insize=1516 file=/ surfaceOnly=0 buildPlatform=19 validAPIs=295472 pKW=SHADER_API_DESKTOP dKW=UNITY_NO_DXT5nm UNITY_ENABLE_REFLECTION_BUFFERS UNITY_FRAMEBUFFER_FETCH_AVAILABLE UNITY_METAL_SHADOWS_USE_POINT_FILTERING UNITY_NO_SCREENSPACE_SHADOWS UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_PBS_USE_BRDF1 UNITY_PBS_USE_BRDF2 UNITY_PBS_USE_BRDF3 UNITY_NO_FULL_STANDARD_SHADER UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING UNITY_ENABLE_DETAIL_NORMALMAP UNITY_HARDWARE_TIER1 UNITY_HARDWARE_TIER2 UNITY_HARDWARE_TIER3 UNITY_COLORSPACE_GAMMA UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_HALF_PRECISION_FRAGMENT_SHADER_REGISTERS UNITY_LIGHTMAP_DLDR_ENCODING UNITY_LIGHTMAP_RGBM_ENCODING UNITY_LIGHTMAP_FULL_HDR UNITY_VIRTUAL_TEXTURING UNITY_PRETRANSFORM_TO_DISPLAY_ORIENTATION UNITY_ASTC_NORMALMAP_ENCODING SHADER_API_GLES30 UNITY_UNIFIED_SHADER_PRECISION_MODEL ok=1 outsize=295
|
||||||
|
|
||||||
|
@ -17,8 +17,11 @@ MonoBehaviour:
|
|||||||
Comment: "\u8840\u91CF"
|
Comment: "\u8840\u91CF"
|
||||||
CalculateMode: 0
|
CalculateMode: 0
|
||||||
SupportedOperation: 31
|
SupportedOperation: 31
|
||||||
DefaultValue: 0
|
DefaultValue:
|
||||||
|
rawValue: 0
|
||||||
LimitMinValue: 0
|
LimitMinValue: 0
|
||||||
MinValue: -3.4028235e+38
|
MinValue:
|
||||||
|
rawValue: -9223372036854775808
|
||||||
LimitMaxValue: 0
|
LimitMaxValue: 0
|
||||||
MaxValue: 3.4028235e+38
|
MaxValue:
|
||||||
|
rawValue: 9223372036854775807
|
||||||
|
Loading…
x
Reference in New Issue
Block a user