mirror of
https://gitee.com/jisol/jisol-game/
synced 2025-06-26 03:14:47 +00:00
提交寻路
This commit is contained in:
parent
16d943ab6b
commit
0a12c49bf1
@ -58,6 +58,8 @@
|
||||
<Compile Include="Assets\Game\Plugins\Unity-Logs-Viewer\Reporter\MultiKeyDictionary.cs" />
|
||||
<Compile Include="Assets\Game\Script\Main.cs" />
|
||||
<Compile Include="Assets\Game\Script\battle\mode\Example11_RVO\GRVO01WorldMode.cs" />
|
||||
<Compile Include="Assets\Game\Script\battle\mode\Example11_RVO\GRVO02WorldPlayerController.cs" />
|
||||
<Compile Include="Assets\Game\Script\battle\mode\Example11_RVO\GRVO02WorldMode.cs" />
|
||||
<None Include="Assets\Game\Plugins\UniTask\package.json" />
|
||||
<None Include="Assets\Packages\System.Runtime.CompilerServices.Unsafe.4.5.2\version.txt" />
|
||||
<None Include="Assets\Game\Resources\PerformanceTestRunSettings.json" />
|
||||
|
@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ea15d1984de842cba18584da709524e7
|
||||
timeCreated: 1707188365
|
@ -0,0 +1,263 @@
|
||||
using System.Collections.Generic;
|
||||
using Plugins.JNGame.Sync.Frame.AStar;
|
||||
using Plugins.JNGame.Sync.Frame.AStar.Modifier;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Profiling;
|
||||
|
||||
namespace Game.Plugins.JNGame.Sync.Frame.AstarPath.AI
|
||||
{
|
||||
public class JNAISeeker
|
||||
{
|
||||
|
||||
public JNAISeeker(JNAStarPath Atar)
|
||||
{
|
||||
this.Atar = Atar;
|
||||
}
|
||||
|
||||
//A*系统
|
||||
public JNAStarPath Atar;
|
||||
|
||||
/// <summary>
|
||||
/// 使用Gizmos绘制最后计算出的路径。
|
||||
/// 路径将以绿色显示。
|
||||
///
|
||||
/// 参见:OnDrawGizmos
|
||||
/// </summary>
|
||||
public bool drawGizmos = true;
|
||||
|
||||
/// <summary>
|
||||
/// 启用使用Gizmos绘制非后处理路径。
|
||||
/// 路径将以橙色显示。
|
||||
///
|
||||
/// 要求 <see cref="drawGizmos"/> 为 true。
|
||||
///
|
||||
/// 这将显示在应用任何后处理(如平滑)之前的路径。
|
||||
///
|
||||
/// 参见:drawGizmos
|
||||
/// 参见:OnDrawGizmos
|
||||
/// </summary>
|
||||
public bool detailedGizmos;
|
||||
|
||||
// /// <summary>路径修改器,用于微调路径的起点和终点</summary>
|
||||
// [HideInInspector] // 在Inspector面板中隐藏此属性
|
||||
// public StartEndModifier startEndModifier = new StartEndModifier(); // 创建一个StartEndModifier实例,用于修改路径的起点和终点
|
||||
|
||||
/// <summary>
|
||||
/// Seeker可以遍历的标签。
|
||||
///
|
||||
/// 注意:此字段是一个位掩码。
|
||||
/// 请参见:位掩码(查看在线文档以获取工作链接)
|
||||
/// </summary>
|
||||
public int traversableTags = -1; // 表示Seeker可以遍历的所有标签。初始值为-1,可能意味着没有限制。
|
||||
|
||||
/// <summary>
|
||||
/// 每个标签的惩罚值。
|
||||
/// 默认标签(即标签0)将有一个惩罚值,该值由tagPenalties[0]给出。
|
||||
/// 这些值应该是正数,因为A*算法无法处理负惩罚值。
|
||||
///
|
||||
/// 注意:此数组的长度应始终为32,否则系统将忽略它。
|
||||
///
|
||||
/// 请参见:Pathfinding.Path.tagPenalties
|
||||
/// </summary>
|
||||
public int[] tagPenalties = new int[32]; // 创建一个长度为32的整数数组,用于存储每个标签的惩罚值
|
||||
|
||||
/// <summary>
|
||||
/// 自定义遍历提供者,用于计算哪些节点可遍历以及它们的惩罚值。
|
||||
///
|
||||
/// 这可以用于覆盖内置的寻路逻辑。(请在线文档中查看工作链接)
|
||||
/// </summary>
|
||||
public ITraversalProvider traversalProvider;
|
||||
|
||||
/// <summary>
|
||||
/// 该搜索器可以使用的图形。
|
||||
/// 此字段决定了在搜索路径的起始和结束节点时应该考虑哪些图形。
|
||||
/// 在许多情况下都很有用,例如,如果你想为小型单位创建一个图形,为大型单位创建另一个图形。
|
||||
///
|
||||
/// 这是一个位掩码,因此,例如,如果你只想让代理仅使用图形索引3,你可以这样设置:
|
||||
/// <code> seeker.graphMask = 1 << 3; </code>
|
||||
///
|
||||
/// 请参阅:位掩码(查看在线文档以获取工作链接)
|
||||
///
|
||||
/// 请注意,此字段仅存储允许的图形索引。这意味着如果图形的顺序发生变化,
|
||||
/// 则此掩码可能不再正确。 GraphMask mask1 = GraphMask.FromGraphName("My Grid Graph");
|
||||
/// GraphMask mask2 = GraphMask.FromGraphName("My Other Grid Graph");
|
||||
///
|
||||
/// NNConstraint nn = NNConstraint.Walkable;
|
||||
///
|
||||
/// nn.graphMask = mask1 | mask2;
|
||||
///
|
||||
/// // 查找与somePoint最近的节点,该节点位于'My Grid Graph'或'My Other Grid Graph'中
|
||||
/// var info = AstarPath.active.GetNearest(somePoint, nn);
|
||||
/// </code>
|
||||
///
|
||||
/// <see cref="StartPath"/>方法的一些重载接受一个graphMask参数。如果使用这些重载,
|
||||
/// 它们将覆盖该路径请求的图形掩码。
|
||||
///
|
||||
/// [打开在线文档以查看图像]
|
||||
///
|
||||
/// 请参阅:多种代理类型(查看在线文档以获取工作链接)
|
||||
/// </summary>
|
||||
public GraphMask graphMask = GraphMask.everything; // 默认情况下,允许所有图形
|
||||
|
||||
/// <summary>当前路径</summary>
|
||||
protected JNPath path;
|
||||
|
||||
/// <summary>
|
||||
/// 上次查询的路径的ID
|
||||
/// </summary>
|
||||
protected uint lastPathID;
|
||||
|
||||
/// <summary>
|
||||
/// 仅对当前路径调用的临时回调函数。该值由StartPath函数设置
|
||||
/// </summary>
|
||||
private OnPathDelegate tmpPathCallback;
|
||||
|
||||
/// <summary>
|
||||
/// 缓存的委托,用于避免每次启动路径时都分配一个新的委托实例
|
||||
/// </summary>
|
||||
private readonly OnPathDelegate onPathDelegate;
|
||||
|
||||
/// <summary>
|
||||
/// 缓存的委托,用于避免每次启动部分路径时都分配一个新的委托实例
|
||||
/// </summary>
|
||||
private readonly OnPathDelegate onPartialPathDelegate;
|
||||
|
||||
/// <summary>在路径查找开始之前调用</summary>
|
||||
public OnPathDelegate preProcessPath;
|
||||
|
||||
/// <summary>
|
||||
/// 所有修饰符的内部列表
|
||||
/// </summary>
|
||||
readonly List<IPathModifier> modifiers = new List<IPathModifier>();
|
||||
|
||||
/// <summary>
|
||||
/// 在路径计算完成后、修饰符执行之前调用。
|
||||
/// </summary>
|
||||
public OnPathDelegate postProcessPath;
|
||||
|
||||
|
||||
public enum ModifierPass {
|
||||
PreProcess,
|
||||
PostProcess = 2,
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 调用此函数开始计算路径。
|
||||
///
|
||||
/// 当路径计算完成(可能是在未来几个帧中)时,将调用回调。
|
||||
/// 如果路径被取消(例如,在之前的路径完成之前请求新的路径),则不会调用回调。
|
||||
/// </summary>
|
||||
/// <param name="start">路径的起点</param>
|
||||
/// <param name="end">路径的终点</param>
|
||||
/// <param name="callback">路径计算完成后要调用的函数</param>
|
||||
public JNPath StartPath(Vector3 start, Vector3 end, OnPathDelegate callback) {
|
||||
return StartPath(JNABPath.Construct(start, end, null), callback);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 调用此函数以开始计算路径。
|
||||
///
|
||||
/// 当路径计算完成后(可能是在未来的多个帧中),将调用回调函数。
|
||||
/// 如果在新的路径请求计算完成之前开始了一个新的路径请求,则不会调用回调函数。
|
||||
///
|
||||
/// 版本:从3.8.3版本开始,如果使用了MultiTargetPath,则此方法将正常工作。
|
||||
/// 它的行为现在与StartMultiTargetPath(MultiTargetPath)方法完全相同。
|
||||
///
|
||||
/// 版本:从4.1.x版本开始,除非明确将其作为参数传递(请参阅此方法的其他重载),否则此方法将不再覆盖路径上的graphMask。
|
||||
/// </summary>
|
||||
/// <param name="p">要开始计算的路径</param>
|
||||
/// <param name="callback">路径计算完成时要调用的函数</param>
|
||||
public JNABPath StartPath(JNABPath p, OnPathDelegate callback = null) {
|
||||
// 仅当用户未从默认值更改它时才设置图掩码。
|
||||
// 这不是完美的,因为用户可能希望它精确为-1,
|
||||
// 但是这是我能做的最佳检测。
|
||||
// 非默认检查主要是为了兼容性原因,以避免破坏人们现有的代码。
|
||||
// 应使用具有显式graphMask字段的StartPath重载来设置graphMask。
|
||||
if (p.nnConstraint.graphMask == -1)
|
||||
{
|
||||
p.nnConstraint.graphMask = graphMask;
|
||||
}
|
||||
StartPathInternal(p, callback);
|
||||
return p;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 在路径上运行修改器
|
||||
/// </summary>
|
||||
/// <param name="pass">修改器传递类型(预处理或后处理)</param>
|
||||
/// <param name="path">要修改的路径</param>
|
||||
public void RunModifiers(ModifierPass pass, JNPath path) {
|
||||
// 如果传递类型是预处理
|
||||
if (pass == ModifierPass.PreProcess) {
|
||||
// 如果预处理路径委托存在,则调用它
|
||||
if (preProcessPath != null) preProcessPath(path);
|
||||
|
||||
// 遍历所有修改器,并对其进行预处理
|
||||
for (int i = 0; i < modifiers.Count; i++)
|
||||
modifiers[i].PreProcess(path);
|
||||
}
|
||||
// 如果传递类型是后处理
|
||||
else if (pass == ModifierPass.PostProcess) {
|
||||
// 开始性能分析样本,记录运行路径修改器的时间
|
||||
Profiler.BeginSample("Running Path Modifiers");
|
||||
|
||||
// 如果后处理路径委托存在,则调用它
|
||||
if (postProcessPath != null) postProcessPath(path);
|
||||
|
||||
// 遍历所有修改器,并应用后处理
|
||||
for (int i = 0; i < modifiers.Count; i++)
|
||||
modifiers[i].Apply(path);
|
||||
|
||||
// 结束性能分析样本
|
||||
Profiler.EndSample();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>内部方法,用于启动一个路径并将其标记为当前活动路径</summary>
|
||||
void StartPathInternal (JNABPath p, OnPathDelegate callback) {
|
||||
var mtp = p as JNMultiTargetPath;
|
||||
if (mtp != null) {
|
||||
// // TODO: Allocation, cache
|
||||
// var callbacks = new OnPathDelegate[mtp.targetPoints.Length];
|
||||
//
|
||||
// for (int i = 0; i < callbacks.Length; i++) {
|
||||
// callbacks[i] = onPartialPathDelegate;
|
||||
// }
|
||||
//
|
||||
// mtp.callbacks = callbacks;
|
||||
// p.callback += OnMultiPathComplete;
|
||||
} else {
|
||||
p.callback += onPathDelegate;
|
||||
}
|
||||
|
||||
p.enabledTags = traversableTags;
|
||||
p.tagPenalties = tagPenalties;
|
||||
if (traversalProvider != null) p.traversalProvider = traversalProvider;
|
||||
|
||||
// 如果之前请求的路径尚未处理,并且确保它没有被回收并在其他地方使用,则取消它
|
||||
if (path != null && path.PipelineState <= PathState.Processing && path.CompleteState != PathCompleteState.Error && lastPathID == path.pathID) {
|
||||
// path.FailWithError("Canceled path because a new one was requested.\n" +
|
||||
// "This happens when a new path is requested from the seeker when one was already being calculated.\n" +
|
||||
// "For example if a unit got a new order, you might request a new path directly instead of waiting for the now" +
|
||||
// " invalid path to be calculated. Which is probably what you want.\n" +
|
||||
// "If you are getting this a lot, you might want to consider how you are scheduling path requests.");
|
||||
// 取消的路径将不会发送回调
|
||||
}
|
||||
|
||||
// 将p设置为活动路径
|
||||
path = p;
|
||||
tmpPathCallback = callback;
|
||||
|
||||
// 保存路径ID,以便我们可以确保如果取消路径(如上所述),它尚未被回收
|
||||
lastPathID = path.pathID;
|
||||
|
||||
// 预处理路径
|
||||
RunModifiers(ModifierPass.PreProcess, path);
|
||||
|
||||
// 将请求发送到寻路器
|
||||
Atar.StartPath(path);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 66618768278f4430b6d96c6a15814be6
|
||||
timeCreated: 1707188365
|
@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bd795436e6ce4872a3eb7bbd8f7a6e61
|
||||
timeCreated: 1707206557
|
@ -0,0 +1,15 @@
|
||||
namespace Plugins.JNGame.Sync.Frame.AStar.Entity
|
||||
{
|
||||
public class AStarData
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 所有Graph。
|
||||
/// 该数组仅在反序列化完成后填充。
|
||||
/// 如果图形已被移除,则可能包含空条目。
|
||||
/// </summary>
|
||||
// 这通常用于防止某些字段被序列化,因为它们可能包含不需要或不能序列化的数据。
|
||||
public NavGraph[] graphs = new NavGraph[0]; // 声明一个 NavGraph 类型的数组,初始化为长度为 0 的数组。
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a5994a8804fe405bb692cda49728167c
|
||||
timeCreated: 1707206826
|
@ -0,0 +1,39 @@
|
||||
namespace Plugins.JNGame.Sync.Frame.AStar.Entity
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 为图形暴露内部方法。
|
||||
/// 这用于隐藏任何用户代码都不应使用但还必须为'public'或'internal'的方法(由于此库附带源代码,因此'internal'几乎与'public'相同)。
|
||||
/// 隐藏内部方法可以清理文档和IntelliSense建议。
|
||||
/// </summary>
|
||||
public interface IGraphInternals {
|
||||
// // 获取或设置序列化后的编辑器设置。
|
||||
// string SerializedEditorSettings { get; set; }
|
||||
//
|
||||
// // 当对象被销毁时调用此方法。
|
||||
// void OnDestroy();
|
||||
//
|
||||
// // 销毁所有节点。
|
||||
// void DestroyAllNodes();
|
||||
//
|
||||
// // 扫描图形并返回进度的集合。
|
||||
// IEnumerable<Progress> ScanInternal();
|
||||
//
|
||||
// // 序列化额外的信息到图形序列化上下文中。
|
||||
// void SerializeExtraInfo(GraphSerializationContext ctx);
|
||||
//
|
||||
// // 从图形序列化上下文中反序列化额外的信息。
|
||||
// void DeserializeExtraInfo(GraphSerializationContext ctx);
|
||||
//
|
||||
// // 在反序列化后执行一些后处理操作。
|
||||
// void PostDeserialization(GraphSerializationContext ctx);
|
||||
//
|
||||
// // 为了兼容性,从图形序列化上下文中反序列化设置。
|
||||
// void DeserializeSettingsCompatibility(GraphSerializationContext ctx);
|
||||
}
|
||||
|
||||
public abstract class NavGraph : IGraphInternals {
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bb12233f444c4d7689972e08336c0fc0
|
||||
timeCreated: 1707206578
|
@ -0,0 +1,23 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Plugins.JNGame.Sync.Frame.AStar.Entity
|
||||
{
|
||||
public class PathReturnQueue
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 保存所有等待标记为已完成的路径。
|
||||
/// 参见:<see cref="ReturnPaths"/>
|
||||
/// </summary>
|
||||
Queue<JNPath> pathReturnQueue = new Queue<JNPath>();
|
||||
|
||||
private JNAStarPath path;
|
||||
|
||||
|
||||
public PathReturnQueue (JNAStarPath path) {
|
||||
this.path = path;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 01b5994c772b486196f2524e7fa2a632
|
||||
timeCreated: 1707208704
|
@ -1,7 +0,0 @@
|
||||
namespace Game.Plugins.JNGame.Sync.Frame.AstarPath
|
||||
{
|
||||
public class JNAStarBase
|
||||
{
|
||||
|
||||
}
|
||||
}
|
@ -1,3 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a3417f25b3114ecc8e596be23f70851f
|
||||
timeCreated: 1707104675
|
@ -0,0 +1,267 @@
|
||||
using System;
|
||||
|
||||
namespace Plugins.JNGame.Sync.Frame.AStar
|
||||
{
|
||||
|
||||
public delegate void OnPathDelegate(JNPath p);
|
||||
// public delegate void OnGraphDelegate(NavGraph graph);
|
||||
// public delegate void OnScanDelegate(AstarPath script);
|
||||
|
||||
/// <summary>
|
||||
/// 持有图形的位掩码。
|
||||
/// 这个位掩码可以容纳最多32个图形。
|
||||
///
|
||||
/// 位掩码可以隐式地转换为整数,也可以从整数隐式转换。.FromGraphName("My Other Grid Graph");
|
||||
///
|
||||
/// NNConstraint nn = NNConstraint.Walkable;
|
||||
///
|
||||
/// nn.graphMask = mask1 | mask2;
|
||||
///
|
||||
/// // 查找与somePoint最近的节点,该节点位于'My Grid Graph'或'My Other Grid Graph'中
|
||||
/// var info = AstarPath.active.GetNearest(somePoint, nn);
|
||||
/// </code>
|
||||
///
|
||||
/// 参见:位掩码(查看在线文档以获取工作链接)
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public struct GraphMask {
|
||||
|
||||
/// <summary>表示掩码的位掩码</summary>
|
||||
public int value;
|
||||
|
||||
/// <summary>包含所有图形的掩码</summary>
|
||||
/// 这是一个静态属性,它返回一个包含所有图形的掩码。在二进制表示中,-1 的所有位都是 1,因此它表示所有图形。
|
||||
public static GraphMask everything { get { return new GraphMask(-1); } }
|
||||
|
||||
public GraphMask(int value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
// 这是一个隐式转换运算符,它允许将 GraphMask 实例隐式转换为整数。转换的结果是 GraphMask 实例的 value 字段的值。
|
||||
public static implicit operator int(GraphMask mask) {
|
||||
return mask.value;
|
||||
}
|
||||
|
||||
|
||||
// 这是另一个隐式转换运算符,它允许将整数隐式转换为 GraphMask 实例。转换的结果是一个新的 GraphMask 实例,其 value 字段的值为传入的整数。
|
||||
public static implicit operator GraphMask(int mask) {
|
||||
return new GraphMask(mask);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>组合两个掩码以形成它们之间的交集</summary>
|
||||
/// 这是一个重载的按位与运算符,它接受两个 GraphMask 实例作为参数,并返回一个新的 GraphMask 实例,表示这两个掩码的交集。
|
||||
public static GraphMask operator &(GraphMask lhs, GraphMask rhs) {
|
||||
return new GraphMask(lhs.value & rhs.value);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>组合两个掩码以形成它们的并集</summary>
|
||||
/// 这是一个重载的按位或运算符,它接受两个 GraphMask 实例作为参数,并返回一个新的 GraphMask 实例,表示这两个掩码的并集。
|
||||
public static GraphMask operator |(GraphMask lhs, GraphMask rhs) {
|
||||
return new GraphMask(lhs.value | rhs.value);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>反转掩码</summary>
|
||||
/// 这是一个重载的按位非运算符,它接受一个 GraphMask 实例作为参数,并返回一个新的 GraphMask 实例,表示该掩码的反转。
|
||||
public static GraphMask operator ~(GraphMask lhs) {
|
||||
return new GraphMask(~lhs.value);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>如果此掩码包含具有给定图形索引的图形,则为真</summary>
|
||||
/// 这是一个方法,它接受一个整数作为参数(表示图形索引),并返回一个布尔值,指示该掩码是否包含具有给定索引的图形。
|
||||
/// 它通过将 value 字段右移 graphIndex 位,然后与 1 进行按位与运算,来检查特定位是否为 1。
|
||||
public bool Contains(int graphIndex) {
|
||||
return ((value >> graphIndex) & 1) != 0;
|
||||
}
|
||||
|
||||
|
||||
// /// <summary>包含给定图形的位掩码</summary>
|
||||
// /// 这是一个静态方法,它接受一个 NavGraph 实例作为参数,并返回一个新的 GraphMask 实例,其中只有与给定图形的索引对应的位被设置为 1。
|
||||
// /// 它通过将 1 左移 graph.graphIndex 位来创建这个掩码。
|
||||
// public static GraphMask FromGraph(NavGraph graph) {
|
||||
// return 1 << (int)graph.graphIndex;
|
||||
// }
|
||||
|
||||
// 这是 ToString 方法的重写,它返回 value 字段的字符串表示形式。这允许 GraphMask 实例以字符串形式输出,通常用于调试或日志记录。
|
||||
public override string ToString() {
|
||||
return value.ToString();
|
||||
}
|
||||
|
||||
/// <summary>包含给定图形索引的位掩码。</summary>
|
||||
/// 这是一个静态方法,它接受一个无符号整数(表示图形索引)作为参数,并返回一个GraphMask实例。
|
||||
/// 它通过将1左移graphIndex位来创建一个位掩码,其中只有与给定索引对应的位被设置为1。
|
||||
public static GraphMask FromGraphIndex(uint graphIndex) => new GraphMask(1 << (int)graphIndex);
|
||||
|
||||
|
||||
// /// <summary>
|
||||
// /// 包含具有给定名称的第一个图形的位掩码。FromGraphName("My Other Grid Graph");
|
||||
// ///
|
||||
// /// NNConstraint nn = NNConstraint.Walkable;
|
||||
// ///
|
||||
// /// nn.graphMask = mask1 | mask2;
|
||||
// ///
|
||||
// /// // 在'My Grid Graph'或'My Other Grid Graph'中找到离somePoint最近的节点
|
||||
// /// var info = AstarPath.active.GetNearest(somePoint, nn);
|
||||
// /// </code>
|
||||
// /// </summary>
|
||||
// /// 这是一个静态方法,它接受一个字符串(表示图形名称)作为参数,并返回一个GraphMask实例。
|
||||
// /// 它首先尝试在活动的Astar数据集中找到具有给定名称的图形。
|
||||
// /// 如果找到图形,它将使用FromGraph方法创建一个包含该图形的位掩码。
|
||||
// /// 如果没有找到匹配的图形,它将抛出一个异常。
|
||||
// public static GraphMask FromGraphName(string graphName) {
|
||||
// // 尝试从活动数据集中找到具有给定名称的图形
|
||||
// var graph = AstarData.active.data.FindGraph(g => g.name == graphName);
|
||||
//
|
||||
// // 如果没有找到与名称匹配的图形,则抛出异常
|
||||
// if (graph == null)
|
||||
// throw new System.ArgumentException("Could not find any graph with the name '" + graphName + "'");
|
||||
//
|
||||
// // 如果找到了图形,使用FromGraph方法创建并返回一个包含该图形的位掩码
|
||||
// return FromGraph(graph);
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 最近节点约束。约束 <see cref="AstarPath.GetNearest"/> 函数返回的节点。
|
||||
/// </summary>
|
||||
public class NNConstraint {
|
||||
|
||||
/// <summary>
|
||||
/// 可用于搜索的图。
|
||||
/// 这是一个位掩码(bitmask),意味着位0指定是否应将图形列表中的第一个图形包含在搜索中,
|
||||
/// 位1指定是否应将第二个图形包含在搜索中,依此类推。 GraphMask.FromGraphName("My Grid Graph");
|
||||
/// GraphMask mask2 = GraphMask.FromGraphName("My Other Grid Graph");
|
||||
///
|
||||
/// NNConstraint nn = NNConstraint.Walkable;
|
||||
///
|
||||
/// nn.graphMask = mask1 | mask2;
|
||||
///
|
||||
/// // 查找与somePoint最近的节点,该节点位于'My Grid Graph'或'My Other Grid Graph'中
|
||||
/// var info = AstarPath.active.GetNearest(somePoint, nn);
|
||||
/// </code>
|
||||
///
|
||||
/// 注意:这仅影响从 <see cref="AstarPath.GetNearest"/> 调用返回的节点,
|
||||
/// 如果一个有效的图通过节点链接连接到一个无效的图,则可能仍然会进行搜索。
|
||||
///
|
||||
/// 参见:<see cref="AstarPath.GetNearest"/>
|
||||
/// 参见:<see cref="SuitableGraph"/>
|
||||
/// 参见:位掩码(在线文档中查看工作链接)
|
||||
/// </summary>
|
||||
public GraphMask graphMask = -1;
|
||||
|
||||
/// <summary>
|
||||
/// 仅将区域 <see cref="area"/> 内的节点视为合适的。如果 <see cref="area"/> 小于 0(零),则不会影响任何内容。
|
||||
/// </summary>
|
||||
public bool constrainArea;
|
||||
|
||||
/// <summary>
|
||||
/// 一个NNConstraint,用于过滤掉不可通过的节点。
|
||||
/// 这是最常用的NNConstraint。
|
||||
///
|
||||
/// 它还约束最近节点必须在A* Inspector -> Settings -> Max Nearest Node Distance设置的最大距离内。
|
||||
/// </summary>
|
||||
public static NNConstraint Walkable {
|
||||
get {
|
||||
return new NNConstraint();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 一个特殊的NNConstraint,可以在路径中的起始节点和结束节点使用不同的逻辑。
|
||||
/// PathNNConstraint可以被分配给Path.nnConstraint字段,路径将首先搜索起始节点,然后它将调用<see cref="SetStart"/>并继续搜索结束节点(对于MultiTargetPath,则是多个节点)。
|
||||
/// 默认的PathNNConstraint将约束终点位于与起点相同的区域内。
|
||||
/// </summary>
|
||||
public class PathNNConstraint : NNConstraint {
|
||||
|
||||
// 定义了一个静态的默认PathNNConstraint实例,该实例在创建时默认将constrainArea设置为true
|
||||
public static new PathNNConstraint Default {
|
||||
get {
|
||||
return new PathNNConstraint {
|
||||
constrainArea = true
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
// /// <summary>在找到起始节点后被调用。这用于在路径中的起始节点和结束节点使用不同的搜索逻辑</summary>
|
||||
// /// <param name="node">找到的起始节点</param>
|
||||
// public virtual void SetStart (GraphNode node) {
|
||||
// // 如果找到的节点不为空,则设置area为节点的Area属性值
|
||||
// if (node != null) {
|
||||
// area = (int)node.Area;
|
||||
// } else {
|
||||
// // 如果节点为空,则禁用区域约束
|
||||
// constrainArea = false;
|
||||
// }
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 路径请求的状态
|
||||
/// </summary>
|
||||
public enum PathCompleteState {
|
||||
/// <summary>
|
||||
/// 路径尚未计算。
|
||||
/// 请参考:<see cref="Pathfinding.Path.IsDone()"/>
|
||||
/// </summary>
|
||||
NotCalculated = 0,
|
||||
|
||||
/// <summary>
|
||||
/// 路径计算已完成,但失败了。
|
||||
/// 请参考:<see cref="Pathfinding.Path.error"/>
|
||||
/// </summary>
|
||||
Error = 1,
|
||||
|
||||
/// <summary>
|
||||
/// 路径已成功计算
|
||||
/// </summary>
|
||||
Complete = 2,
|
||||
|
||||
/// <summary>
|
||||
/// 路径已计算,但只找到了部分路径。
|
||||
/// 请参考:<see cref="Pathfinding.ABPath.calculatePartial"/>
|
||||
/// </summary>
|
||||
Partial = 3,
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 路径在管道中的内部状态
|
||||
/// </summary>
|
||||
public enum PathState {
|
||||
/// <summary>
|
||||
/// 路径已创建但尚未安排
|
||||
/// </summary>
|
||||
Created = 0,
|
||||
|
||||
/// <summary>
|
||||
/// 路径正在等待计算
|
||||
/// </summary>
|
||||
PathQueue = 1,
|
||||
|
||||
/// <summary>
|
||||
/// 路径正在计算中
|
||||
/// </summary>
|
||||
Processing = 2,
|
||||
|
||||
/// <summary>
|
||||
/// 路径已计算完成,正在等待调用回调函数
|
||||
/// </summary>
|
||||
ReturnQueue = 3,
|
||||
|
||||
/// <summary>
|
||||
/// 目前正在调用路径的回调函数(仅在回调函数内部设置)
|
||||
/// </summary>
|
||||
Returning = 4,
|
||||
|
||||
/// <summary>
|
||||
/// 路径已计算完成且回调函数已调用
|
||||
/// </summary>
|
||||
Returned = 5,
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f220b46018bc4401ab01f5724b4cfdba
|
||||
timeCreated: 1707189107
|
@ -1,13 +1,84 @@
|
||||
|
||||
namespace Game.Plugins.JNGame.Sync.Frame.AstarPath
|
||||
using System;
|
||||
using Plugins.JNGame.Sync.Frame.AStar.Entity;
|
||||
using Plugins.JNGame.Sync.Frame.AStar.Processor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Plugins.JNGame.Sync.Frame.AStar
|
||||
{
|
||||
/**
|
||||
* 寻路类
|
||||
*/
|
||||
//A* 寻路
|
||||
public class JNAStarPath
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 存储所有等待计算的路径并计算它们
|
||||
/// </summary>
|
||||
public PathProcessor pathProcessor;
|
||||
|
||||
/// <summary>
|
||||
/// 导航数据
|
||||
/// </summary>
|
||||
public AStarData data = new AStarData();
|
||||
|
||||
/// <summary>Shortcut to Pathfinding.AstarData.graphs</summary>
|
||||
public NavGraph[] graphs => data.graphs;
|
||||
|
||||
/// <summary>保存所有已完成的路径,等待返回至请求它们的地方</summary>
|
||||
internal readonly PathReturnQueue pathReturnQueue;
|
||||
|
||||
|
||||
public JNAStarPath()
|
||||
{
|
||||
|
||||
pathReturnQueue = new PathReturnQueue(this);;
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 将路径添加到队列中,以便尽快进行计算。
|
||||
/// 当路径计算完成时,将调用在构造路径时指定的回调。
|
||||
/// 通常,你应该使用Seeker组件而不是直接调用此函数。
|
||||
/// </summary>
|
||||
/// <param name="path">应该入队的路径。</param>
|
||||
/// <param name="pushToFront">如果为true,则将路径推送到队列的前面,绕过所有等待的路径,使其成为下一个要计算的路径。
|
||||
/// 如果你有一个想要优先于其他所有路径的路径,这可能会很有用。但是,请注意不要过度使用它。
|
||||
/// 如果经常将太多路径放在队列的前面,这可能会导致正常路径需要等待很长时间才能进行计算。</param>
|
||||
public void StartPath(JNPath path, bool pushToFront = false)
|
||||
{
|
||||
|
||||
// 如果路径的状态不是已创建,则抛出异常
|
||||
if (path.PipelineState != PathState.Created)
|
||||
{
|
||||
Debug.LogError("路径的状态无效。预期值为 " + PathState.Created + ",找到的值为 " + path.PipelineState + "\n" +
|
||||
"确保你没有请求同一个路径两次");
|
||||
}
|
||||
|
||||
// 如果没有在场景中的图形,则记录错误并使路径失败
|
||||
if (this.graphs == null || this.graphs.Length == 0)
|
||||
{
|
||||
Debug.LogError("场景中没有图形");
|
||||
return;
|
||||
}
|
||||
|
||||
// 声明该路径属于AStarPath对象
|
||||
path.Claim(this);
|
||||
|
||||
// 将路径的状态从已创建更改为在路径队列中
|
||||
((IPathInternals)path).AdvanceState(PathState.PathQueue);
|
||||
|
||||
// 如果指定了pushToFront参数为true,则将路径推送到队列的前面
|
||||
// 否则,将路径推送到队列的末尾
|
||||
if (pushToFront){
|
||||
this.pathProcessor.queue.AddFirst(path);
|
||||
}else{
|
||||
this.pathProcessor.queue.AddLast(path);
|
||||
}
|
||||
|
||||
// // 在播放模式之外,所有路径请求都是同步的
|
||||
// if (!Application.isPlaying) {
|
||||
// BlockUntilCalculated(path);
|
||||
// }
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
@ -1,3 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 79d7cad08d874b6aba4388770d624c79
|
||||
timeCreated: 1707104391
|
||||
guid: 16e7d844387d4a26a28eb48731f86a00
|
||||
timeCreated: 1707204238
|
@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bff5409c229d40ccba5802f6d14c962d
|
||||
timeCreated: 1707203362
|
@ -0,0 +1,27 @@
|
||||
namespace Plugins.JNGame.Sync.Frame.AStar.Modifier
|
||||
{
|
||||
/// <summary>
|
||||
/// 所有路径修饰符的基础接口。
|
||||
/// 参见:MonoModifier
|
||||
/// Modifier
|
||||
/// </summary>
|
||||
public interface IPathModifier
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取修饰符的处理顺序。
|
||||
/// </summary>
|
||||
int Order { get; }
|
||||
|
||||
/// <summary>
|
||||
/// 将修饰符应用于给定的路径。
|
||||
/// </summary>
|
||||
/// <param name="path">要应用修饰符的路径。</param>
|
||||
void Apply(JNPath path);
|
||||
|
||||
/// <summary>
|
||||
/// 在处理路径之前进行预处理。
|
||||
/// </summary>
|
||||
/// <param name="path">要进行预处理的路径。</param>
|
||||
void PreProcess(JNPath path);
|
||||
}
|
||||
}
|
@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2ed6304696424c04b5f813c80a1caf7c
|
||||
timeCreated: 1707203397
|
@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2d59f34978e848e791c4d0e3d43950fe
|
||||
timeCreated: 1707189548
|
@ -0,0 +1,94 @@
|
||||
using Game.Plugins.JNGame.Sync.Frame.AStar.Util;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Plugins.JNGame.Sync.Frame.AStar
|
||||
{
|
||||
/// <summary>
|
||||
/// 基础路径类,用于从A点找到到B点的最短路径。
|
||||
///
|
||||
/// 这是最基本的路径对象,它将尝试找到两点之间的最短路径。
|
||||
/// 许多其他路径类型都继承自这个类。
|
||||
/// 请参见:Seeker.StartPath
|
||||
/// 请参见:calling-pathfinding(请在线文档查看有效链接)
|
||||
/// 请参见:getstarted(请在线文档查看有效链接)
|
||||
/// </summary>
|
||||
public class JNABPath : JNPath
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 与路径请求中完全相同的起点
|
||||
/// </summary>
|
||||
public Vector3 originalStartPoint;
|
||||
|
||||
/// <summary>
|
||||
/// 路径的起点。
|
||||
/// 这是 <see cref="startNode"/> 上最接近 <see cref="originalStartPoint"/> 的点。
|
||||
/// </summary>
|
||||
public Vector3 startPoint;
|
||||
|
||||
/// <summary>
|
||||
/// 与路径请求中完全相同的终点
|
||||
/// </summary>
|
||||
public Vector3 originalEndPoint;
|
||||
|
||||
/// <summary>
|
||||
/// 路径的终点。
|
||||
/// 这是 <see cref="endNode"/> 上最接近 <see cref="originalEndPoint"/> 的点。
|
||||
/// </summary>
|
||||
public Vector3 endPoint;
|
||||
|
||||
/// <summary>整数坐标下的起点</summary>
|
||||
public Int3 startIntPoint;
|
||||
|
||||
/// <summary>
|
||||
/// 为路径请求提供额外的遍历信息。
|
||||
/// 参见:traversal_provider(请在线文档中查看以获取有效链接)。
|
||||
/// </summary>
|
||||
public ITraversalProvider traversalProvider;
|
||||
|
||||
/// <summary>
|
||||
/// 使用起始点和终点构造一个路径。
|
||||
/// 当路径计算完成后,将调用指定的委托。
|
||||
/// 不要将其与 Seeker 的回调混淆,因为它们在不同的时间点发送。
|
||||
/// 如果你使用 Seeker 来启动路径,你可以将回调设置为 null。
|
||||
///
|
||||
/// 返回值:构造的路径对象
|
||||
/// </summary>
|
||||
public static JNABPath Construct(Vector3 start, Vector3 end, OnPathDelegate callback = null) {
|
||||
// // 从路径池中获取一个ABPath对象。路径池是一种优化技术,用于重用和减少内存分配。
|
||||
// var p = PathPool.GetPath<ABPath>();
|
||||
//前期直接 New 因为不确定对象池是否可以帧同步
|
||||
var p = new JNABPath();
|
||||
|
||||
// 设置路径的起始点、终点和回调委托。
|
||||
p.Setup(start, end, callback);
|
||||
|
||||
// 返回构造好的路径对象。
|
||||
return p;
|
||||
}
|
||||
|
||||
protected void Setup (Vector3 start, Vector3 end, OnPathDelegate callbackDelegate) {
|
||||
callback = callbackDelegate;
|
||||
UpdateStartEnd(start, end);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 设置起始点和终点。
|
||||
/// 设置 <see cref="originalStartPoint"/>, <see cref="originalEndPoint"/>, <see cref="startPoint"/>, <see cref="endPoint"/>, <see cref="startIntPoint"/> 和 <see cref="hTarget"/>(至终点)
|
||||
/// </summary>
|
||||
protected void UpdateStartEnd(Vector3 start, Vector3 end) {
|
||||
// 将传入的起始点赋值给 originalStartPoint 和 startPoint 变量
|
||||
originalStartPoint = start;
|
||||
startPoint = start;
|
||||
|
||||
// 将传入的终点赋值给 originalEndPoint, endPoint 和 hTarget 变量
|
||||
originalEndPoint = end;
|
||||
endPoint = end;
|
||||
hTarget = (Int3)end; // 注意这里将 Vector3 类型的 end 强制转换为 Int3 类型
|
||||
|
||||
// 将起始点 start 转换为 Int3 类型并赋值给 startIntPoint 变量
|
||||
startIntPoint = (Int3)start;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7ab89baa2672478ba1aaf8824ea5ccfa
|
||||
timeCreated: 1707189578
|
@ -0,0 +1,29 @@
|
||||
namespace Plugins.JNGame.Sync.Frame.AStar
|
||||
{
|
||||
/// <summary>
|
||||
/// 一个路径,用于在一次搜索中从一个点到多个不同的目标点搜索,或者从多个不同的起点到单个目标点搜索。
|
||||
///
|
||||
/// 如果pathsForAll为true,这比为每个目标使用ABPath进行搜索更快。
|
||||
/// 这种路径类型可用于例如当你想让一个代理从几个不同的选项中找到最近的目标时。
|
||||
///
|
||||
/// 当pathsForAll为true时,它将为每个目标点计算路径,但不同的路径可以共享大量的计算,因此
|
||||
/// 这比单独请求它们要快。
|
||||
///
|
||||
/// 当pathsForAll为false时,它将使用启发式设置为None进行搜索,并在找到第一个目标时停止。
|
||||
/// 这可能比单独请求每个路径更快或更慢。
|
||||
/// 它将运行一个Dijkstra搜索,搜索起点周围的所有节点,直到找到最近的目标。
|
||||
/// 请注意,如果一些目标点非常接近起点,而另一些非常远,那么这通常更快,但
|
||||
/// 如果所有目标点都相对较远,那么由于不使用任何启发式,它将不得不搜索一个更大的
|
||||
/// 区域,因此可能会更慢。
|
||||
///
|
||||
/// 参见:Seeker.StartMultiTargetPath
|
||||
/// 参见:MultiTargetPathExample.cs(查看在线文档以获取工作链接)“多目标路径使用示例”
|
||||
///
|
||||
/// 版本:从3.7.1版本开始,即使pathsForAll为true,vectorPath和path字段也始终设置为最短路径。
|
||||
/// </summary>
|
||||
// MultiTargetPath类继承自ABPath类,用于表示从一个点到多个目标的路径或多起点到单一目标的路径
|
||||
public class JNMultiTargetPath : JNABPath
|
||||
{
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b30abfb6dce3449491d3059e448c0823
|
||||
timeCreated: 1707199274
|
@ -0,0 +1,365 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Game.Plugins.JNGame.Sync.Frame.AStar.Util;
|
||||
using UnityEngine;
|
||||
using NotImplementedException = System.NotImplementedException;
|
||||
using Object = System.Object;
|
||||
|
||||
namespace Plugins.JNGame.Sync.Frame.AStar
|
||||
{
|
||||
/// <summary>
|
||||
/// 为路径请求提供额外的遍历信息。
|
||||
/// 请在线文档中查看 traversal_provider(以获取有效的链接)。
|
||||
/// </summary>
|
||||
public interface ITraversalProvider {
|
||||
// bool CanTraverse(JNAStarPath path, GraphNode node);
|
||||
// uint GetTraversalCost(JNAStarPath path, GraphNode node);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 用于隐藏Path类的内部方法
|
||||
/// </summary>
|
||||
internal interface IPathInternals
|
||||
{
|
||||
// /// <summary>
|
||||
// /// 获取路径处理器
|
||||
// /// </summary>
|
||||
// PathHandler PathHandler { get; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置路径是否已被池化(即是否被复用)
|
||||
/// </summary>
|
||||
bool Pooled { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 将路径状态向前推进到指定的状态
|
||||
/// </summary>
|
||||
/// <param name="s">目标路径状态</param>
|
||||
void AdvanceState(PathState s);
|
||||
|
||||
/// <summary>
|
||||
/// 当路径被加入池化时调用
|
||||
/// </summary>
|
||||
void OnEnterPool();
|
||||
|
||||
/// <summary>
|
||||
/// 重置路径的状态和属性
|
||||
/// </summary>
|
||||
void Reset();
|
||||
|
||||
/// <summary>
|
||||
/// 将路径返回给路径池
|
||||
/// </summary>
|
||||
void ReturnPath();
|
||||
|
||||
// /// <summary>
|
||||
// /// 为基础路径处理器做准备
|
||||
// /// </summary>
|
||||
// /// <param name="handler">路径处理器</param>
|
||||
// void PrepareBase(PathHandler handler);
|
||||
|
||||
/// <summary>
|
||||
/// 准备路径以供使用
|
||||
/// </summary>
|
||||
void Prepare();
|
||||
|
||||
/// <summary>
|
||||
/// 初始化路径
|
||||
/// </summary>
|
||||
void Initialize();
|
||||
|
||||
/// <summary>
|
||||
/// 清理路径资源和状态
|
||||
/// </summary>
|
||||
void Cleanup();
|
||||
|
||||
/// <summary>
|
||||
/// 根据目标时间戳计算路径的下一步
|
||||
/// </summary>
|
||||
/// <param name="targetTick">目标时间戳</param>
|
||||
void CalculateStep(long targetTick);
|
||||
|
||||
// /// <summary>
|
||||
// /// 获取用于调试的路径日志字符串
|
||||
// /// </summary>
|
||||
// /// <param name="logMode">日志模式</param>
|
||||
// /// <returns>调试字符串</returns>
|
||||
// string DebugString(PathLog logMode);
|
||||
}
|
||||
|
||||
public class JNPath : IPathInternals
|
||||
{
|
||||
/// <summary>
|
||||
/// 此路径的ID。用于区分不同的路径
|
||||
/// </summary>
|
||||
public ushort pathID { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// 用于指定如何搜索节点的约束条件
|
||||
/// </summary>
|
||||
public NNConstraint nnConstraint = PathNNConstraint.Walkable;
|
||||
|
||||
/// <summary>
|
||||
/// 当路径计算完成时调用的回调。
|
||||
/// 这个回调通常被发送给 Seeker 组件,该组件对路径进行后处理,然后调用请求路径的脚本的回调。
|
||||
/// </summary>
|
||||
public OnPathDelegate callback;
|
||||
|
||||
/// <summary>用于H分数计算的目标点。参见:Pathfinding.Node.H</summary>
|
||||
protected Int3 hTarget;
|
||||
|
||||
/// <summary>
|
||||
/// 可遍历的图标签。
|
||||
/// 这是一个位掩码,因此-1表示所有位都设置为可遍历的所有标签。); </code>
|
||||
///
|
||||
/// 搜索器(Seeker)有一个弹出字段,您可以在其中设置要使用的标签。
|
||||
/// 注意:如果您正在使用搜索器(Seeker)。在StartPath时,搜索器(Seeker)会将此值设置为检查器字段中设置的值。
|
||||
/// 因此,如果您想通过脚本更改它,需要通过脚本更改搜索器(Seeker)的值,而不是设置此值。
|
||||
///
|
||||
/// 参考:CanTraverse
|
||||
/// </summary>
|
||||
public int enabledTags = -1;
|
||||
|
||||
/// <summary>
|
||||
/// 由其他脚本设置的标签惩罚值
|
||||
/// 参见:tagPenalties
|
||||
/// </summary>
|
||||
protected int[] manualTagPenalties;
|
||||
|
||||
/// <summary>
|
||||
/// 实际使用的标签惩罚值。
|
||||
/// 如果 manualTagPenalties 为 null,那么这将是 ZeroTagPenalties。
|
||||
/// 参见:tagPenalties
|
||||
/// </summary>
|
||||
protected int[] internalTagPenalties;
|
||||
|
||||
/// <summary>用作默认标签惩罚值的零值列表</summary>
|
||||
static readonly int[] ZeroTagPenalties = new int[32];
|
||||
|
||||
/// <summary>
|
||||
/// 返回路径查找管道中路径的状态
|
||||
/// </summary>
|
||||
public PathState PipelineState { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// 支持<see cref="CompleteState"/>属性的后备字段
|
||||
/// </summary>
|
||||
protected PathCompleteState completeState;
|
||||
|
||||
/// <summary>
|
||||
/// 包含引用对象的此路径上的声明列表
|
||||
/// </summary>
|
||||
private List<Object> claimed = new();
|
||||
|
||||
/// <summary>
|
||||
/// 如果路径已经通过非静默调用被释放,则为True。
|
||||
///
|
||||
/// 参见:Release
|
||||
/// 参见:Claim
|
||||
/// </summary>
|
||||
private bool releasedNotSilent;
|
||||
|
||||
/// <summary>
|
||||
/// 如果路径失败,此属性为 true。
|
||||
/// 参见:<see cref="errorLog"/>
|
||||
/// 参见:这相当于检查 path.CompleteState == PathCompleteState.Error
|
||||
/// </summary>
|
||||
public bool error { get { return CompleteState == PathCompleteState.Error; } }
|
||||
|
||||
/// <summary>
|
||||
/// 存储(可能经过后处理)的路径作为 Vector3 列表。
|
||||
///
|
||||
/// 该列表可能会被路径修饰器修改,与路径查找算法生成的原始路径相比,可能会更平滑或更简单。
|
||||
///
|
||||
/// 参见:修饰器(请查阅在线文档以获取有效链接)
|
||||
/// 参见:<see cref="path"/>
|
||||
/// </summary>
|
||||
public List<Vector3> vectorPath;
|
||||
|
||||
/// <summary>
|
||||
/// 路径的当前状态。
|
||||
/// Bug:当前可能在路径完全计算之前就将此属性设置为Complete。特别是,vectorPath和path列表可能尚未完全构建。
|
||||
/// 在使用多线程时,这可能导致竞态条件。尽量避免使用此方法检查路径是否已计算完成,而应使用<see cref="IsDone"/>。
|
||||
/// </summary>
|
||||
public PathCompleteState CompleteState {
|
||||
get { return completeState; }
|
||||
protected set {
|
||||
// // 使用锁定来避免多线程竞态条件,
|
||||
// // 在这种情况下,主线程将错误状态设置为取消路径,然后寻路线程将路径标记为完成,
|
||||
// // 这将替换错误状态(如果没有使用锁定和检查)。
|
||||
// lock (stateLock) {
|
||||
// 一旦路径进入错误状态,就不能将其设置为任何其他状态
|
||||
if (completeState != PathCompleteState.Error) completeState = value;
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 每个标签的惩罚值。
|
||||
/// 默认标签(即标签0)将添加tagPenalties[0]的惩罚值。
|
||||
/// 这些值应为正数,因为A*算法无法处理负惩罚值。
|
||||
///
|
||||
/// 当为这个属性分配数组时,它必须长度为32。
|
||||
///
|
||||
/// 注意:将此属性设置为null,或者尝试分配一个长度不为32的数组,将使得所有标签的惩罚值被视为零。
|
||||
///
|
||||
/// 注意:如果你正在使用Seeker。当你调用seeker.StartPath时,Seeker会将此值设置为检查器字段中设置的值。
|
||||
/// 因此,你需要通过脚本来更改Seeker的值,而不是设置这个值。
|
||||
///
|
||||
/// 参见:Seeker.tagPenalties
|
||||
/// </summary>
|
||||
public int[] tagPenalties {
|
||||
get {
|
||||
// 获取器(getter),返回当前的手动设置的标签惩罚值数组
|
||||
return manualTagPenalties;
|
||||
}
|
||||
set {
|
||||
// 设置器(setter),允许外部设置标签惩罚值数组
|
||||
if (value == null || value.Length != 32) {
|
||||
// 如果传入的数组为null或长度不为32,则将手动设置的标签惩罚值数组设为null
|
||||
// 同时将内部使用的标签惩罚值数组设为默认零惩罚值数组
|
||||
manualTagPenalties = null;
|
||||
internalTagPenalties = ZeroTagPenalties;
|
||||
} else {
|
||||
// 如果传入的数组有效(非null且长度为32),则更新手动设置的标签惩罚值数组
|
||||
// 同时更新内部使用的标签惩罚值数组
|
||||
manualTagPenalties = value;
|
||||
internalTagPenalties = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 将此路径的引用计数增加1(用于池化)。
|
||||
/// 对路径的声明将确保它不会被池化。
|
||||
/// 如果您正在使用路径,则应在首次获取它时声明它,然后在不再使用它时释放它。当路径上没有声明时,它将被重置并放入池中。
|
||||
///
|
||||
/// 这本质上是引用计数。
|
||||
///
|
||||
/// 传递给此方法的对象仅用于更容易地检测池化是否未正确完成。
|
||||
/// 它可以是任何对象,当从移动脚本中使用时,您可以只传递“this”。如果尝试使用相同的对象对同一路径进行两次声明(这通常不是您想要的)
|
||||
/// 或者如果尝试使用未在该路径的Claim调用中使用的对象进行释放,则此类将引发异常。
|
||||
/// 传递给Claim方法的对象需要与您传递给此方法的对象相同。
|
||||
///
|
||||
/// 参见:Release
|
||||
/// 参见:Pool
|
||||
/// 参见:pooling(请在线文档中查看工作链接)
|
||||
/// 参见:https://en.wikipedia.org/wiki/Reference_counting
|
||||
/// </summary>
|
||||
public void Claim(Object o)
|
||||
{
|
||||
// 如果传递的对象为空,则抛出空引用异常
|
||||
if (Object.ReferenceEquals(o, null)) throw new ArgumentNullException("o");
|
||||
|
||||
// 遍历已声明的对象列表
|
||||
for (int i = 0; i < claimed.Count; i++)
|
||||
{
|
||||
// 需要使用ReferenceEquals,因为它可能从另一个线程调用
|
||||
// 如果已声明的列表中存在相同的对象,则抛出参数异常
|
||||
if (Object.ReferenceEquals(claimed[i], o))
|
||||
throw new ArgumentException("您已经使用该对象 (" + o + ") 声明了路径。您是否尝试使用相同的对象两次来声明路径?");
|
||||
}
|
||||
|
||||
// 将对象添加到已声明的列表中
|
||||
claimed.Add(o);
|
||||
|
||||
// // 如果定义了ASTAR_POOL_DEBUG,则记录声明信息,包括对象的字符串表示和堆栈跟踪
|
||||
// claimInfo.Add(o.ToString() + "\n\nClaimed from:\n" + System.Environment.StackTrace);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 线程安全地增加状态
|
||||
/// </summary>
|
||||
void IPathInternals.AdvanceState(PathState s) {
|
||||
// lock (stateLock) {
|
||||
// // 使用lock关键字确保在修改PipelineState时的线程安全
|
||||
// // 将PipelineState更新为PipelineState和s中较大的那个值
|
||||
// PipelineState = (PathState)System.Math.Max((int)PipelineState, (int)s);
|
||||
// }
|
||||
PipelineState = (PathState)Math.Max((int)PipelineState, (int)s);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 减少路径的引用计数(对象池技术)。
|
||||
/// 移除指定对象对路径的声明。
|
||||
/// 当引用计数达到零时,路径将被放回对象池,所有变量将被清除,以便再次使用。
|
||||
/// 这对于性能提升很有帮助,因为减少了对象的分配。
|
||||
///
|
||||
/// 如果silent参数为true,则此方法将仅移除指定对象的声明,
|
||||
/// 但如果声明计数达到零,路径也不会被放回对象池,除非之前已经有一个非silent的Release调用。
|
||||
/// 这被内部路径查找组件(如Seeker和AstarPath)所使用,以便它们不会导致路径被放回对象池,
|
||||
/// 从而避免在用户跳过声明/释放调用时产生奇怪的bug。
|
||||
///
|
||||
/// 参见:Claim
|
||||
/// 参见:PathPool
|
||||
/// </summary>
|
||||
/// <param name="o">要释放路径声明的对象。</param>
|
||||
/// <param name="silent">是否静默释放,默认为false。</param>
|
||||
public void Release (Object o, bool silent = false) {
|
||||
// 检查传入的对象是否为null,如果是则抛出异常
|
||||
if (o == null) throw new ArgumentNullException("o");
|
||||
|
||||
// 遍历当前所有已声明的对象
|
||||
for (int i = 0; i < claimed.Count; i++) {
|
||||
// 使用ReferenceEquals是因为这个方法可能会从另一个线程被调用
|
||||
// 如果当前遍历到的对象与传入的对象是同一个对象(引用相同)
|
||||
if (ReferenceEquals(claimed[i], o)) {
|
||||
|
||||
// 从已声明列表中移除该对象
|
||||
claimed.RemoveAt(i);
|
||||
|
||||
// 如果不是静默释放,则标记为非静默已释放
|
||||
if (!silent) {
|
||||
releasedNotSilent = true;
|
||||
}
|
||||
|
||||
// 如果已声明列表为空且之前有过非静默释放,则将当前路径对象放回对象池
|
||||
if (claimed.Count == 0 && releasedNotSilent) {
|
||||
// PathPool.Pool(this);
|
||||
}
|
||||
|
||||
// 找到并处理完目标对象后,提前返回
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public bool Pooled { get; set; }
|
||||
public void OnEnterPool()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void Reset()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void ReturnPath()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void Prepare()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void Initialize()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void Cleanup()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void CalculateStep(long targetTick)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 37fceeaba5504147a7966ad31bbdf3bf
|
||||
timeCreated: 1707189234
|
@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 31a221f8276442f69b19987aed2f148f
|
||||
timeCreated: 1707205010
|
@ -0,0 +1,12 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Plugins.JNGame.Sync.Frame.AStar.Processor
|
||||
{
|
||||
public class PathProcessor
|
||||
{
|
||||
|
||||
// public Queue<JNPath> queue = new Queue<JNPath>();
|
||||
public LinkedList<JNPath> queue = new LinkedList<JNPath>();
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1a93001ec12e445c9fd37c274dec33ed
|
||||
timeCreated: 1707205024
|
@ -0,0 +1,369 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace Game.Plugins.JNGame.Sync.Frame.AstarPath.RVO
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// RVO角色控制器 用于处理基于RVO算法的局部避让,允许开发者在复杂的动态环境中控制角色的移动,同时避免与其他角色发生碰撞。。
|
||||
/// 与Unity的CharacterController类似。它处理移动计算并考虑其他代理。
|
||||
/// 它本身不处理移动,但允许调用脚本获取计算出的速度,
|
||||
/// 并使用适合的方法移动对象(例如使用CharacterController,使用Point = transform.position + transform.forward * 100;
|
||||
///
|
||||
/// // 使用期望的速度10和最大速度12设置要移动到的目标点
|
||||
/// controller.SetTarget(targetPoint, 10, 12);
|
||||
///
|
||||
/// // 计算这一帧中要移动的距离
|
||||
/// // 此信息基于之前帧的移动命令
|
||||
/// // 因为局部避让是由RVOSimulator组件定期全局计算的
|
||||
/// var delta = controller.CalculateMovementDelta(transform.position, Time.deltaTime);
|
||||
/// transform.position = transform.position + delta;
|
||||
/// }
|
||||
///
|
||||
/// 关于这个类中许多变量的文档:请参阅Pathfinding.RVO.IAgent接口。
|
||||
///
|
||||
/// 注意:场景中需要一个RVOSimulator组件
|
||||
///
|
||||
/// 请参阅:Pathfinding.RVO.IAgent
|
||||
/// 请参阅:RVOSimulator
|
||||
/// 请参阅:local-avoidance(在在线文档中查看工作链接)
|
||||
/// </summary>
|
||||
public class JNRVOController
|
||||
{
|
||||
|
||||
// 内部浮点型字段,用于存储半径值,初始化为0.5
|
||||
internal float radiusBackingField = 0.5f;
|
||||
// 浮点型字段,用于存储高度值,初始化为2
|
||||
float heightBackingField = 2;
|
||||
// 浮点型字段,用于存储中心点值,初始化为1
|
||||
float centerBackingField = 1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 代理在世界单位中的半径。
|
||||
/// 注意:如果同一个GameObject上附加了移动脚本(AIPath/RichAI/AILerp,任何实现IAstarAI接口的内容),则该值将由该脚本驱动。
|
||||
/// </summary>
|
||||
// 定义一个公共的浮点型属性radius,用于表示代理在世界单位中的半径。
|
||||
// 当一个GameObject同时附加了移动脚本(实现了IAstarAI接口的脚本)时,radius的值将由该脚本决定。
|
||||
public float radius {
|
||||
get => radiusBackingField;
|
||||
set => radiusBackingField = value;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 代理在世界单位中的高度。
|
||||
/// </summary>
|
||||
public float height
|
||||
{
|
||||
get => heightBackingField;
|
||||
set => heightBackingField = value;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 代理相对于此游戏对象枢转点的中心位置。
|
||||
/// </summary>
|
||||
public float center
|
||||
{
|
||||
get => centerBackingField;
|
||||
// 如果有 AI 脚本附加,该值将始终被驱动为 height/2,因为移动脚本期望对象的位置在其脚下
|
||||
// 如果没有 AI 脚本附加,则返回 centerBackingField 的值
|
||||
set => centerBackingField = value;
|
||||
}
|
||||
|
||||
/// <summary>内部代理的引用</summary>
|
||||
public JNIAgent rvoAgent { get; private set; }
|
||||
|
||||
|
||||
/// <summary>缓存的对象</summary>
|
||||
protected GameObject obj;
|
||||
|
||||
///避障核心类
|
||||
private JNRVOSimulator Simulator;
|
||||
|
||||
/// <summary>
|
||||
/// 在未来多少秒内寻找与其他代理的碰撞(以秒为单位)。这个变量表示在预测未来的移动路径时,应该考虑多少秒内的碰撞检测。
|
||||
/// </summary>
|
||||
public float agentTimeHorizon = 2;
|
||||
|
||||
/// <summary>
|
||||
/// 在未来多少秒内寻找与障碍物的碰撞(以秒为单位)。 这个变量表示在预测未来的移动路径时,应该考虑多少秒内的与障碍物的碰撞检测。
|
||||
/// </summary>
|
||||
public float obstacleTimeHorizon = 2;
|
||||
|
||||
/// <summary>
|
||||
/// 一个被锁定的单位不能移动。其他单位仍然会避开它,但避开的质量不是最好的。
|
||||
/// </summary>
|
||||
public bool locked = false;
|
||||
|
||||
/// <summary>
|
||||
/// 考虑在内的其他代理的最大数量。
|
||||
/// 较小的值可以减少CPU负载,而较高的值可以提高局部避让的质量。
|
||||
/// 如果将maxNeighbours设置得较小,可以减少代理需要计算的碰撞避免逻辑,从而减轻CPU的负担。
|
||||
/// 如果将maxNeighbours设置得较高,代理将考虑更多的其他代理,这可能会导致更精确的避让行为,但也会增加CPU的负载。
|
||||
/// </summary>
|
||||
public int maxNeighbours = 10;
|
||||
|
||||
/// <summary>DEBUG 绘制</summary>
|
||||
public bool debug;
|
||||
|
||||
/// <summary>
|
||||
/// 指定此代理的避让层。
|
||||
/// 其他代理的<see cref="collidesWith"/>掩码将确定它们是否会避开此代理。
|
||||
/// </summary>
|
||||
public JNRVOLayer layer = JNRVOLayer.DefaultAgent;
|
||||
|
||||
/// <summary>
|
||||
/// 一个层掩码,指定此代理将避免哪些层。
|
||||
/// 你可以这样设置它:CollidesWith = RVOLayer.DefaultAgent | RVOLayer.Layer3 | RVOLayer.Layer6 ...
|
||||
/// 在具有多个团队的游戏中,这非常有用。例如,你通常希望一个团队中的代理避免彼此,但你不希望他们避免敌人。
|
||||
/// 此字段仅影响此代理将避免哪些其他代理,它不影响其他代理如何对此代理做出反应。
|
||||
/// 参见:位掩码(在线文档中查看相关链接)
|
||||
/// 参见:http://en.wikipedia.org/wiki/Mask_(computing)
|
||||
/// </summary>
|
||||
public JNRVOLayer collidesWith = (JNRVOLayer)(-1);
|
||||
|
||||
/// <summary>
|
||||
/// 使用Tooltip特性为属性提供工具提示,说明其他代理将如何强烈地避免此代理。
|
||||
/// 使用UnityEngine.Range特性限制priority属性的值范围在0到1之间。
|
||||
/// 这个变量表示其他代理在避让此代理时的优先级或强度。值越高,其他代理将更强烈地避免与此代理碰撞。
|
||||
/// </summary>
|
||||
public float priority = 0.5f;
|
||||
|
||||
/// <summary>
|
||||
/// 当期望的速度接近于零时,自动将 <see cref="locked"/> 设置为 true。
|
||||
/// 这可以防止其他单位在它们应该执行例如阻塞瓶颈等操作时将它们推开。
|
||||
///
|
||||
/// 当此属性为 true 时,每次调用 <see cref="SetTarget"/> 或 <see cref="Move"/> 方法时,
|
||||
/// 如果期望的速度不为零,则将 <see cref="locked"/> 字段设置为 true,否则设置为 false。
|
||||
/// </summary>
|
||||
public bool lockWhenNotMoving = false;
|
||||
|
||||
/// <summary>
|
||||
/// 将3D向量转换为运动平面上的2D向量。
|
||||
/// 如果运动平面是XZ,则将其投影到XZ平面上,
|
||||
/// 否则将其投影到XY平面上。
|
||||
/// </summary>
|
||||
/// <param name="p">要转换的3D向量</param>
|
||||
/// <returns>转换后的2D向量</returns>
|
||||
public Vector2 To2D(Vector3 p) {
|
||||
float dummy; // 定义一个临时变量dummy,用于接收不需要的输出值
|
||||
|
||||
// 调用重载的To2D方法,将3D向量p和dummy作为参数传递,并返回转换后的2D向量
|
||||
return To2D(p, out dummy);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 将运动平面上的二维向量及其高度转换为三维坐标。
|
||||
/// 参见:To2D 方法(用于将三维坐标转换为二维向量和高度)
|
||||
/// 参见:movementPlane 属性(定义代理的运动平面)
|
||||
/// </summary>
|
||||
/// <param name="p">二维向量,表示运动平面上的坐标。</param>
|
||||
/// <param name="elevationCoordinate">高度坐标,根据运动平面的不同,它可能表示不同的轴。</param>
|
||||
/// <returns>返回转换后的三维坐标。</returns>
|
||||
public Vector3 To3D(Vector2 p, float elevationCoordinate)
|
||||
{
|
||||
// 根据 movementPlane 的值,将二维向量和高度转换为三维坐标
|
||||
if (movementPlane == MovementPlane.XY)
|
||||
{
|
||||
// 如果运动平面是 XY 平面,则 Z 轴表示高度(但此处使用负值,可能是根据具体应用场景而定)
|
||||
return new Vector3(p.x, p.y, -elevationCoordinate);
|
||||
}
|
||||
else
|
||||
{
|
||||
// 如果运动平面不是 XY 平面(可能是 XZ 平面),则 Y 轴表示高度
|
||||
return new Vector3(p.x, elevationCoordinate, p.y);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 将3D向量转换为运动平面上的2D向量。
|
||||
/// 如果运动平面是XZ,则将其投影到XZ平面上,并将高度坐标设置为Y坐标;
|
||||
/// 否则,将其投影到XY平面上,并将高度设置为Z坐标。
|
||||
/// </summary>
|
||||
/// <param name="p">要转换的3D向量</param>
|
||||
/// <param name="elevation">转换后的高度坐标</param>
|
||||
/// <returns>转换后的2D向量</returns>
|
||||
public Vector2 To2D(Vector3 p, out float elevation) {
|
||||
// 判断当前的运动平面
|
||||
if (movementPlane == MovementPlane.XY) {
|
||||
// 如果运动平面是XY,则将Y坐标作为高度,并返回X和Y组成的2D向量
|
||||
elevation = -p.z; // 高度设置为-Z坐标(通常用于表示高度或海拔)
|
||||
return new Vector2(p.x, p.y); // 返回X和Y组成的2D向量
|
||||
} else {
|
||||
// 如果运动平面不是XY(即XZ),则将Y坐标作为高度,并返回X和Z组成的2D向量
|
||||
elevation = p.y; // 高度设置为Y坐标
|
||||
return new Vector2(p.x, p.z); // 返回X和Z组成的2D向量
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 确定是否使用XY(2D)或XZ(3D)平面进行移动
|
||||
/// </summary>
|
||||
public MovementPlane movementPlane {
|
||||
get => Simulator.movementPlane;
|
||||
}
|
||||
|
||||
|
||||
public JNRVOController(JNRVOSimulator Simulator,GameObject obj)
|
||||
{
|
||||
this.obj = obj;
|
||||
this.Simulator = Simulator;
|
||||
|
||||
// 如果是这样的话,我们可以简单地将它再次添加到模拟中
|
||||
if (rvoAgent != null) {
|
||||
// 我们将其再次添加到模拟器中
|
||||
Simulator.AddAgent(rvoAgent);
|
||||
} else {
|
||||
// 如果 rvoAgent 为空,表示之前没有实例或者实例已被销毁
|
||||
// 我们创建一个新的代理实例并添加到模拟器中
|
||||
// 使用初始位置 Vector2.zero(通常代表坐标(0,0))和初始方向 0(通常代表面向上)来创建新的代理
|
||||
rvoAgent = Simulator.AddAgent(Vector2.zero, 0);
|
||||
|
||||
// 设置 rvoAgent 的 PreCalculationCallback 为 UpdateAgentProperties 方法
|
||||
// 这意味着在每次模拟计算之前,都会调用 UpdateAgentProperties 方法来更新代理的属性
|
||||
rvoAgent.PreCalculationCallback = UpdateAgentProperties;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新代理的属性
|
||||
/// </summary>
|
||||
protected void UpdateAgentProperties()
|
||||
{
|
||||
// 获取当前代理的本地缩放比例
|
||||
var scale = obj.transform.localScale;
|
||||
|
||||
// 设置代理的半径,至少为0.001,通常根据半径与X轴缩放比例的乘积来确定
|
||||
rvoAgent.Radius = Mathf.Max(0.001f, radius * scale.x);
|
||||
|
||||
// 设置代理的时间预测范围
|
||||
rvoAgent.AgentTimeHorizon = agentTimeHorizon;
|
||||
|
||||
// 设置代理与障碍物的时间预测范围
|
||||
rvoAgent.ObstacleTimeHorizon = obstacleTimeHorizon;
|
||||
|
||||
// 锁定代理,使其不参与模拟计算
|
||||
rvoAgent.Locked = locked;
|
||||
|
||||
// 设置代理的最大邻居数量
|
||||
rvoAgent.MaxNeighbours = maxNeighbours;
|
||||
|
||||
// 是否开启代理的调试绘制
|
||||
rvoAgent.DebugDraw = debug;
|
||||
|
||||
// 设置代理所在的层级
|
||||
rvoAgent.Layer = layer;
|
||||
|
||||
// 设置代理与哪些类型的代理发生碰撞
|
||||
rvoAgent.CollidesWith = collidesWith;
|
||||
|
||||
// 设置代理的优先级
|
||||
rvoAgent.Priority = priority;
|
||||
|
||||
float elevation;
|
||||
|
||||
// 如果存在移动脚本,则使用移动脚本的位置作为代理的位置
|
||||
// 因为移动脚本的位置可能与Transform组件的位置不同(特别是在IAstarAI.updatePosition为false时)
|
||||
rvoAgent.Position = To2D(obj.transform.position, out elevation);
|
||||
|
||||
// 根据移动平面设置代理的高度和高度坐标
|
||||
if (movementPlane == MovementPlane.XZ)
|
||||
{
|
||||
// 如果移动平面是XZ平面,则设置代理的高度为缩放后的高度值
|
||||
rvoAgent.Height = height * scale.y;
|
||||
|
||||
// 设置代理的高度坐标,根据中心点和高度计算得出
|
||||
rvoAgent.ElevationCoordinate = elevation + (center - 0.5f * height) * scale.y;
|
||||
}
|
||||
else
|
||||
{
|
||||
// 如果移动平面不是XZ平面,则将代理的高度设置为1,高度坐标设置为0
|
||||
rvoAgent.Height = 1;
|
||||
rvoAgent.ElevationCoordinate = 0;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 为代理设置移动的目标点。
|
||||
/// 与 <see cref="Move"/> 方法类似,但更加灵活。
|
||||
/// 在路径的末尾使用此方法更好,因为使用 Move 方法时,代理不知道应该在何处停止,因此可能会超过目标点。
|
||||
/// 使用此方法时,代理不会超过目标点。
|
||||
/// 代理将假设当它到达目标点时会停止,因此请确保如果你只是想朝特定方向移动,则不要将点设置得太靠近代理。
|
||||
///
|
||||
/// 目标点将保持不变,直到请求其他点(而不是每帧重置)。
|
||||
///
|
||||
/// 请参阅:也请查看 <see cref="IAgent.SetTarget"/> 的文档,其中有更多详细信息。
|
||||
/// 请参阅:<see cref="Move"/>
|
||||
/// </summary>
|
||||
/// <param name="pos">要移动到的世界空间中的点。</param>
|
||||
/// <param name="speed">每秒在世界单位中期望的速度。</param>
|
||||
/// <param name="maxSpeed">每秒在世界单位中的最大速度。
|
||||
/// 如果必要,代理将使用此速度以避免与其他代理发生碰撞。
|
||||
/// 应该至少与 speed 一样高,但建议使用比 speed 略高的值(例如 speed*1.2)。</param>
|
||||
public void SetTarget(Vector3 pos, float speed, float maxSpeed) {
|
||||
|
||||
// 将 3D 位置转换为 2D 位置,并设置给 rvoAgent
|
||||
rvoAgent.SetTarget(To2D(pos), speed, maxSpeed);
|
||||
|
||||
// 如果 lockWhenNotMoving 为 true,则根据速度是否低于某个阈值来锁定代理
|
||||
if (lockWhenNotMoving) {
|
||||
locked = speed < 0.001f;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 设置代理的期望速度。
|
||||
/// 请注意,这是一个速度(单位/秒),而不是移动增量(单位/帧)。
|
||||
///
|
||||
/// 此速度将保持不变,直到请求其他值(而不是每帧重置)。
|
||||
///
|
||||
/// 注意:在大多数情况下,使用 SetTarget 方法是更好的选择。
|
||||
/// 实际上,此方法将调用 SetTarget 并传递(位置 + 速度)作为目标点。
|
||||
/// 请参阅 IAgent.SetTarget 文档中的说明,了解这可能导致的潜在问题(特别是可能很难让代理在精确的点停止)。
|
||||
/// </summary>
|
||||
public void Move(Vector3 vel) {
|
||||
|
||||
// 将 3D 速度转换为 2D 速度
|
||||
var velocity2D = To2D(vel);
|
||||
// 获取速度的大小(即速度的模)
|
||||
var speed = velocity2D.magnitude;
|
||||
|
||||
// 调用 rvoAgent 的 SetTarget 方法,设置目标点为当前位置(如果 ai 不为 null,则使用 ai.position,否则使用 tr.position)加上 2D 速度
|
||||
// 最大速度和期望速度都设置为 speed
|
||||
rvoAgent.SetTarget(To2D(obj.transform.position) + velocity2D, speed, speed);
|
||||
|
||||
// 如果 lockWhenNotMoving 为 true,则根据速度是否低于 0.001f 来设置 locked 标志
|
||||
if (lockWhenNotMoving) {
|
||||
locked = speed < 0.001f;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 计算单个帧内为避免障碍物而移动的方向和距离。
|
||||
///
|
||||
/// 代理的位置取自附加的移动脚本的位置(参见 <see cref="Pathfinding.IAstarAI.position"/>),如果没有附加,则取自 transform.position。
|
||||
/// </summary>
|
||||
/// <param name="deltaTime">移动的时间长度[秒]。
|
||||
/// 通常设置为 Time.deltaTime。</param>
|
||||
/// <returns>返回一个 Vector3 类型的值,表示代理在单个帧内为避免障碍物而移动的方向和距离。</returns>
|
||||
public Vector3 CalculateMovementDelta(float deltaTime)
|
||||
{
|
||||
// 如果 rvoAgent 为空,则返回零向量,即代理不进行移动
|
||||
if (rvoAgent == null) return Vector3.zero;
|
||||
|
||||
// 计算目标点和代理当前位置之间的二维向量差
|
||||
Vector2 movementVector = rvoAgent.CalculatedTargetPoint - To2D(obj.transform.position);
|
||||
|
||||
// 限制向量的幅度(即长度),确保不超过代理在给定时间内可以移动的最大距离
|
||||
Vector2 clampedVector = Vector2.ClampMagnitude(movementVector, rvoAgent.CalculatedSpeed * deltaTime);
|
||||
|
||||
// 将二维向量转换为三维向量,其中 Z 分量为 0
|
||||
Vector3 movementDelta = To3D(clampedVector, 0);
|
||||
|
||||
// 返回计算出的移动方向和距离
|
||||
return movementDelta;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3f94234bdfb64d4aa45c5a19466414e7
|
||||
timeCreated: 1707210242
|
@ -306,7 +306,7 @@ namespace Game.Plugins.JNGame.Sync.Frame.AstarPath.RVO
|
||||
/// Inverse desired simulation fps.
|
||||
/// See: DesiredDeltaTime
|
||||
/// </summary>
|
||||
private float desiredDeltaTime = 0.05f;
|
||||
private float desiredDeltaTime = 0.03f;
|
||||
|
||||
/// <summary>
|
||||
/// Time in seconds between each simulation step.
|
||||
|
496
JNFrame/Assets/Game/Scenes/Mode/Example11_RVO/GRVO02World.unity
Normal file
496
JNFrame/Assets/Game/Scenes/Mode/Example11_RVO/GRVO02World.unity
Normal file
@ -0,0 +1,496 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!29 &1
|
||||
OcclusionCullingSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_OcclusionBakeSettings:
|
||||
smallestOccluder: 5
|
||||
smallestHole: 0.25
|
||||
backfaceThreshold: 100
|
||||
m_SceneGUID: 00000000000000000000000000000000
|
||||
m_OcclusionCullingData: {fileID: 0}
|
||||
--- !u!104 &2
|
||||
RenderSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 9
|
||||
m_Fog: 0
|
||||
m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
|
||||
m_FogMode: 3
|
||||
m_FogDensity: 0.01
|
||||
m_LinearFogStart: 0
|
||||
m_LinearFogEnd: 300
|
||||
m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1}
|
||||
m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1}
|
||||
m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}
|
||||
m_AmbientIntensity: 1
|
||||
m_AmbientMode: 0
|
||||
m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
|
||||
m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_HaloStrength: 0.5
|
||||
m_FlareStrength: 1
|
||||
m_FlareFadeSpeed: 3
|
||||
m_HaloTexture: {fileID: 0}
|
||||
m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_DefaultReflectionMode: 0
|
||||
m_DefaultReflectionResolution: 128
|
||||
m_ReflectionBounces: 1
|
||||
m_ReflectionIntensity: 1
|
||||
m_CustomReflection: {fileID: 0}
|
||||
m_Sun: {fileID: 0}
|
||||
m_IndirectSpecularColor: {r: 0.18028378, g: 0.22571412, b: 0.30692285, a: 1}
|
||||
m_UseRadianceAmbientProbe: 0
|
||||
--- !u!157 &3
|
||||
LightmapSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 12
|
||||
m_GIWorkflowMode: 1
|
||||
m_GISettings:
|
||||
serializedVersion: 2
|
||||
m_BounceScale: 1
|
||||
m_IndirectOutputScale: 1
|
||||
m_AlbedoBoost: 1
|
||||
m_EnvironmentLightingMode: 0
|
||||
m_EnableBakedLightmaps: 1
|
||||
m_EnableRealtimeLightmaps: 0
|
||||
m_LightmapEditorSettings:
|
||||
serializedVersion: 12
|
||||
m_Resolution: 2
|
||||
m_BakeResolution: 40
|
||||
m_AtlasSize: 1024
|
||||
m_AO: 0
|
||||
m_AOMaxDistance: 1
|
||||
m_CompAOExponent: 1
|
||||
m_CompAOExponentDirect: 0
|
||||
m_ExtractAmbientOcclusion: 0
|
||||
m_Padding: 2
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_LightmapsBakeMode: 1
|
||||
m_TextureCompression: 1
|
||||
m_FinalGather: 0
|
||||
m_FinalGatherFiltering: 1
|
||||
m_FinalGatherRayCount: 256
|
||||
m_ReflectionCompression: 2
|
||||
m_MixedBakeMode: 2
|
||||
m_BakeBackend: 1
|
||||
m_PVRSampling: 1
|
||||
m_PVRDirectSampleCount: 32
|
||||
m_PVRSampleCount: 512
|
||||
m_PVRBounces: 2
|
||||
m_PVREnvironmentSampleCount: 256
|
||||
m_PVREnvironmentReferencePointCount: 2048
|
||||
m_PVRFilteringMode: 1
|
||||
m_PVRDenoiserTypeDirect: 1
|
||||
m_PVRDenoiserTypeIndirect: 1
|
||||
m_PVRDenoiserTypeAO: 1
|
||||
m_PVRFilterTypeDirect: 0
|
||||
m_PVRFilterTypeIndirect: 0
|
||||
m_PVRFilterTypeAO: 0
|
||||
m_PVREnvironmentMIS: 1
|
||||
m_PVRCulling: 1
|
||||
m_PVRFilteringGaussRadiusDirect: 1
|
||||
m_PVRFilteringGaussRadiusIndirect: 5
|
||||
m_PVRFilteringGaussRadiusAO: 2
|
||||
m_PVRFilteringAtrousPositionSigmaDirect: 0.5
|
||||
m_PVRFilteringAtrousPositionSigmaIndirect: 2
|
||||
m_PVRFilteringAtrousPositionSigmaAO: 1
|
||||
m_ExportTrainingData: 0
|
||||
m_TrainingDataDestination: TrainingData
|
||||
m_LightProbeSampleCountMultiplier: 4
|
||||
m_LightingDataAsset: {fileID: 0}
|
||||
m_LightingSettings: {fileID: 0}
|
||||
--- !u!196 &4
|
||||
NavMeshSettings:
|
||||
serializedVersion: 2
|
||||
m_ObjectHideFlags: 0
|
||||
m_BuildSettings:
|
||||
serializedVersion: 2
|
||||
agentTypeID: 0
|
||||
agentRadius: 0.5
|
||||
agentHeight: 2
|
||||
agentSlope: 45
|
||||
agentClimb: 0.4
|
||||
ledgeDropHeight: 0
|
||||
maxJumpAcrossDistance: 0
|
||||
minRegionArea: 2
|
||||
manualCellSize: 0
|
||||
cellSize: 0.16666667
|
||||
manualTileSize: 0
|
||||
tileSize: 256
|
||||
accuratePlacement: 0
|
||||
maxJobWorkers: 0
|
||||
preserveTilesOutsideBounds: 0
|
||||
debug:
|
||||
m_Flags: 0
|
||||
m_NavMeshData: {fileID: 0}
|
||||
--- !u!1 &956222750
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 956222754}
|
||||
- component: {fileID: 956222753}
|
||||
- component: {fileID: 956222752}
|
||||
- component: {fileID: 956222751}
|
||||
m_Layer: 0
|
||||
m_Name: Plane
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!64 &956222751
|
||||
MeshCollider:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 956222750}
|
||||
m_Material: {fileID: 0}
|
||||
m_IsTrigger: 0
|
||||
m_Enabled: 1
|
||||
serializedVersion: 4
|
||||
m_Convex: 0
|
||||
m_CookingOptions: 30
|
||||
m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0}
|
||||
--- !u!23 &956222752
|
||||
MeshRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 956222750}
|
||||
m_Enabled: 1
|
||||
m_CastShadows: 1
|
||||
m_ReceiveShadows: 1
|
||||
m_DynamicOccludee: 1
|
||||
m_StaticShadowCaster: 0
|
||||
m_MotionVectors: 1
|
||||
m_LightProbeUsage: 1
|
||||
m_ReflectionProbeUsage: 1
|
||||
m_RayTracingMode: 2
|
||||
m_RayTraceProcedural: 0
|
||||
m_RenderingLayerMask: 1
|
||||
m_RendererPriority: 0
|
||||
m_Materials:
|
||||
- {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_StaticBatchInfo:
|
||||
firstSubMesh: 0
|
||||
subMeshCount: 0
|
||||
m_StaticBatchRoot: {fileID: 0}
|
||||
m_ProbeAnchor: {fileID: 0}
|
||||
m_LightProbeVolumeOverride: {fileID: 0}
|
||||
m_ScaleInLightmap: 1
|
||||
m_ReceiveGI: 1
|
||||
m_PreserveUVs: 0
|
||||
m_IgnoreNormalsForChartDetection: 0
|
||||
m_ImportantGI: 0
|
||||
m_StitchLightmapSeams: 1
|
||||
m_SelectedEditorRenderState: 3
|
||||
m_MinimumChartSize: 4
|
||||
m_AutoUVMaxDistance: 0.5
|
||||
m_AutoUVMaxAngle: 89
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 0
|
||||
m_AdditionalVertexStreams: {fileID: 0}
|
||||
--- !u!33 &956222753
|
||||
MeshFilter:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 956222750}
|
||||
m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0}
|
||||
--- !u!4 &956222754
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 956222750}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 100, y: 1, z: 100}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 1799725643}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &963821750
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 963821753}
|
||||
- component: {fileID: 963821752}
|
||||
m_Layer: 0
|
||||
m_Name: Main Camera
|
||||
m_TagString: MainCamera
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!20 &963821752
|
||||
Camera:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 963821750}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_ClearFlags: 1
|
||||
m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}
|
||||
m_projectionMatrixMode: 1
|
||||
m_GateFitMode: 2
|
||||
m_FOVAxisMode: 0
|
||||
m_SensorSize: {x: 36, y: 24}
|
||||
m_LensShift: {x: 0, y: 0}
|
||||
m_FocalLength: 50
|
||||
m_NormalizedViewPortRect:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 0
|
||||
width: 1
|
||||
height: 1
|
||||
near clip plane: 0.3
|
||||
far clip plane: 1000
|
||||
field of view: 60
|
||||
orthographic: 0
|
||||
orthographic size: 5
|
||||
m_Depth: -1
|
||||
m_CullingMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_RenderingPath: -1
|
||||
m_TargetTexture: {fileID: 0}
|
||||
m_TargetDisplay: 0
|
||||
m_TargetEye: 3
|
||||
m_HDR: 1
|
||||
m_AllowMSAA: 1
|
||||
m_AllowDynamicResolution: 0
|
||||
m_ForceIntoRT: 0
|
||||
m_OcclusionCulling: 1
|
||||
m_StereoConvergence: 10
|
||||
m_StereoSeparation: 0.022
|
||||
--- !u!4 &963821753
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 963821750}
|
||||
m_LocalRotation: {x: -0.0065903203, y: 0.7045085, z: -0.70962507, w: -0.0075322096}
|
||||
m_LocalPosition: {x: -34.862534, y: 264.16022, z: -2.0391257}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &988048031
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 988048033}
|
||||
- component: {fileID: 988048032}
|
||||
m_Layer: 0
|
||||
m_Name: Directional Light
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!108 &988048032
|
||||
Light:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 988048031}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 10
|
||||
m_Type: 1
|
||||
m_Shape: 0
|
||||
m_Color: {r: 1, g: 0.9607685, b: 0.8537736, a: 1}
|
||||
m_Intensity: 1
|
||||
m_Range: 10
|
||||
m_SpotAngle: 30
|
||||
m_InnerSpotAngle: 21.80208
|
||||
m_CookieSize: 10
|
||||
m_Shadows:
|
||||
m_Type: 2
|
||||
m_Resolution: -1
|
||||
m_CustomResolution: -1
|
||||
m_Strength: 1
|
||||
m_Bias: 0.05
|
||||
m_NormalBias: 0.4
|
||||
m_NearPlane: 0.2
|
||||
m_CullingMatrixOverride:
|
||||
e00: 1
|
||||
e01: 0
|
||||
e02: 0
|
||||
e03: 0
|
||||
e10: 0
|
||||
e11: 1
|
||||
e12: 0
|
||||
e13: 0
|
||||
e20: 0
|
||||
e21: 0
|
||||
e22: 1
|
||||
e23: 0
|
||||
e30: 0
|
||||
e31: 0
|
||||
e32: 0
|
||||
e33: 1
|
||||
m_UseCullingMatrixOverride: 0
|
||||
m_Cookie: {fileID: 0}
|
||||
m_DrawHalo: 0
|
||||
m_Flare: {fileID: 0}
|
||||
m_RenderMode: 0
|
||||
m_CullingMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_RenderingLayerMask: 1
|
||||
m_Lightmapping: 4
|
||||
m_LightShadowCasterMode: 0
|
||||
m_AreaSize: {x: 1, y: 1}
|
||||
m_BounceIntensity: 1
|
||||
m_ColorTemperature: 6570
|
||||
m_UseColorTemperature: 0
|
||||
m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_UseBoundingSphereOverride: 0
|
||||
m_UseViewFrustumForShadowCasterCull: 1
|
||||
m_ShadowRadius: 0
|
||||
m_ShadowAngle: 0
|
||||
--- !u!4 &988048033
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 988048031}
|
||||
m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261}
|
||||
m_LocalPosition: {x: 0, y: 3, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0}
|
||||
--- !u!1 &1207843367
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1207843369}
|
||||
- component: {fileID: 1207843368}
|
||||
m_Layer: 0
|
||||
m_Name: GameObject
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!114 &1207843368
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1207843367}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: a83c78eaa47b3244c9974793e439d257, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
_nId: 0
|
||||
IsRunStart: 0
|
||||
isSyncInitSuccess: 0
|
||||
mode: {fileID: 1799725642}
|
||||
moveNextDist: 1
|
||||
nextRepath: 1
|
||||
slowdownDistance: 1
|
||||
maxSpeed: 10
|
||||
groundMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 1
|
||||
--- !u!4 &1207843369
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1207843367}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 1799725643}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &1799725641
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1799725643}
|
||||
- component: {fileID: 1799725642}
|
||||
m_Layer: 0
|
||||
m_Name: GMode
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!114 &1799725642
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1799725641}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: a85dc713c3eb290448e178323fed525c, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
_nId: 0
|
||||
IsRunStart: 0
|
||||
isSyncInitSuccess: 0
|
||||
--- !u!4 &1799725643
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1799725641}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 1207843369}
|
||||
- {fileID: 956222754}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 2
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 20b9deb2a5e66a14bbd648adf2b7b9b2
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -26,7 +26,7 @@ namespace Script.battle
|
||||
public class GBattleModeManager : SingletonScene<GBattleModeManager>
|
||||
{
|
||||
|
||||
private static readonly string[] Worlds = { "GRVO01World", };
|
||||
private static readonly string[] Worlds = { "GRVO02World", };
|
||||
|
||||
//当前模式
|
||||
private GBattleMode _current = GBattleMode.Not;
|
||||
|
@ -0,0 +1,21 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Game.Plugins.JNGame.Sync.Frame.AstarPath.RVO;
|
||||
using Plugins.JNGame.Sync.Frame.AStar;
|
||||
using Script.battle;
|
||||
using UnityEngine;
|
||||
|
||||
public class GRVO02WorldMode : GBaseMode<Object>
|
||||
{
|
||||
|
||||
//初始化3D避障
|
||||
[HideInInspector]
|
||||
public JNRVOSimulator Simulator = new(MovementPlane.XZ);
|
||||
|
||||
//初始化寻路
|
||||
[HideInInspector]
|
||||
public JNAStarPath AStar = new();
|
||||
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a85dc713c3eb290448e178323fed525c
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,227 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Game.Plugins.App.Sync;
|
||||
using Game.Plugins.JNGame.Sync.Frame.AStar.Util;
|
||||
using Game.Plugins.JNGame.Sync.Frame.AstarPath.AI;
|
||||
using Game.Plugins.JNGame.Sync.Frame.AstarPath.RVO;
|
||||
using Plugins.JNGame.Sync.Frame.AStar;
|
||||
using Plugins.JNGame.Sync.Frame.game.Time;
|
||||
using Plugins.JNGame.Util;
|
||||
using UnityEngine;
|
||||
|
||||
public class GRVO02WorldPlayerController : JNGSyncFrameDefault
|
||||
{
|
||||
//模式
|
||||
public GRVO02WorldMode mode;
|
||||
|
||||
//添加寻路AI
|
||||
private JNAISeeker ai;
|
||||
//添加RVO避障 控制器 (里面默认使用避障)
|
||||
private JNRVOController rvo;
|
||||
|
||||
//目标位置
|
||||
private Vector3 target;
|
||||
|
||||
//是否正在查询位置
|
||||
private bool canSearchAgain = true;
|
||||
|
||||
//当前路径
|
||||
private JNPath path = null;
|
||||
|
||||
// 向量路径
|
||||
List<Vector3> vectorPath;
|
||||
// waypoint进度
|
||||
private int wp = 0;
|
||||
|
||||
//移动距离
|
||||
public float moveNextDist = 1;
|
||||
|
||||
//下一次寻路 (主要目的是为了在寻路过程中引入一定的随机性和变化,特别是在动态环境或者存在移动障碍物的场景中。这样的设计可以帮助代理(例如游戏中的角色)更加智能和灵活地适应环境的变化 )
|
||||
//如果不重新计算路径,代理可能会遇到障碍物而停止移动,或者沿着一条不再是最佳(甚至不再可通行)的路径移动
|
||||
public float nextRepath = 1;
|
||||
|
||||
//平滑停止
|
||||
public float slowdownDistance = 1;
|
||||
|
||||
//最大速度
|
||||
public float maxSpeed = 10;
|
||||
|
||||
//碰撞层级
|
||||
public LayerMask groundMask;
|
||||
|
||||
public override void OnSyncLoad()
|
||||
{
|
||||
base.OnSyncLoad();
|
||||
//初始化寻路AI
|
||||
ai = new JNAISeeker(mode.AStar);
|
||||
//初始化避障控制器
|
||||
rvo = new JNRVOController(mode.Simulator,gameObject);
|
||||
}
|
||||
|
||||
//设置移动位置
|
||||
public void SetTarget (Vector3 target) {
|
||||
this.target = target;
|
||||
RecalculatePath();
|
||||
}
|
||||
|
||||
/// 重新计算到达目标点的路径
|
||||
public void RecalculatePath() {
|
||||
//不允许再次搜索路径
|
||||
canSearchAgain = false;
|
||||
//下一次寻路时间
|
||||
nextRepath = GetSync().Time.time + 2;
|
||||
// 启动路径搜索,传入当前位置、目标位置和路径搜索完成的回调函数
|
||||
ai.StartPath(transform.position, target, OnPathComplete);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 路径搜索完成时的回调函数
|
||||
/// <param name="_p">搜索得到的路径</param>
|
||||
public void OnPathComplete(JNPath _p) {
|
||||
// 将传入的路径尝试转换为ABPath类型
|
||||
JNABPath p = _p as JNABPath;
|
||||
|
||||
// 允许再次搜索路径
|
||||
canSearchAgain = true;
|
||||
|
||||
// 如果之前存在路径对象,则释放对它的引用
|
||||
if (path != null) path.Release(this);
|
||||
|
||||
// 更新当前路径对象为搜索得到的新路径
|
||||
path = p;
|
||||
|
||||
// 声明对该路径的所有权
|
||||
p.Claim(this);
|
||||
|
||||
// 如果路径搜索出错(比如没有找到可行路径)
|
||||
if (p.error) {
|
||||
//重置数据
|
||||
// 重置waypoint进度
|
||||
wp = 0;
|
||||
// 清空向量路径
|
||||
vectorPath = null;
|
||||
// 提前返回,不再继续执行后续代码
|
||||
return;
|
||||
}
|
||||
|
||||
// 获取路径的起始点
|
||||
Vector3 p1 = p.originalStartPoint;
|
||||
// 获取代理当前的位置
|
||||
Vector3 p2 = transform.position;
|
||||
// 将起始点的y坐标设置为当前位置的y坐标,确保路径在同一水平面上
|
||||
p1.y = p2.y;
|
||||
// 计算当前位置与起始点之间的距离
|
||||
float d = (p2 - p1).magnitude;
|
||||
// 重置waypoint进度
|
||||
wp = 0;
|
||||
|
||||
// 更新向量路径为搜索得到的新路径的向量表示
|
||||
vectorPath = p.vectorPath;
|
||||
Vector3 waypoint; // 用于存储当前waypoint的位置
|
||||
|
||||
// 如果定义了每次移动的最大距离(moveNextDist > 0)
|
||||
if (moveNextDist > 0) {
|
||||
// 遍历从起始点到当前位置的距离,每次增加moveNextDist的60%
|
||||
for (float t = 0; t <= d; t += moveNextDist * 0.6f) {
|
||||
// 递减waypoint索引,因为我们是从路径的末尾开始向前遍历
|
||||
wp--;
|
||||
// 计算当前位置的向量表示
|
||||
Vector3 pos = p1 + (p2 - p1) * t;
|
||||
|
||||
// 循环遍历向量路径,直到找到一个waypoint,使得代理从当前位置移动到该waypoint的距离
|
||||
// 大于或等于moveNextDist,或者已经到达向量路径的最后一个waypoint
|
||||
do {
|
||||
// 递增waypoint索引
|
||||
wp++;
|
||||
// 获取向量路径中当前waypoint的位置
|
||||
waypoint = vectorPath[wp];
|
||||
// 循环条件:代理到当前waypoint的距离小于moveNextDist,并且还没有到达向量路径的最后一个waypoint
|
||||
} while (rvo.To2D(pos - waypoint).sqrMagnitude < moveNextDist * moveNextDist && wp != vectorPath.Count - 1);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public override void OnSyncUpdate(int dt, JNFrameInfo frame, Object input)
|
||||
{
|
||||
base.OnSyncUpdate(dt, frame, input);
|
||||
|
||||
// 检查是否需要重新计算路径
|
||||
if (GetSync().Time.time >= nextRepath && canSearchAgain)
|
||||
{
|
||||
RecalculatePath();
|
||||
}
|
||||
|
||||
Vector3 pos = transform.position;
|
||||
|
||||
// 如果存在路径且路径不为空
|
||||
if (vectorPath != null && vectorPath.Count != 0)
|
||||
{
|
||||
// 遍历路径直到找到下一个要到达的点
|
||||
while ((rvo.To2D(pos - vectorPath[wp]).sqrMagnitude < moveNextDist * moveNextDist && wp != vectorPath.Count - 1) || wp == 0)
|
||||
{
|
||||
wp++;
|
||||
}
|
||||
|
||||
// 计算路径段上的点
|
||||
var p1 = vectorPath[wp - 1];
|
||||
var p2 = vectorPath[wp];
|
||||
var t = VectorMath.LineCircleIntersectionFactor(rvo.To2D(transform.position), rvo.To2D(p1), rvo.To2D(p2), moveNextDist);
|
||||
t = Mathf.Clamp01(t);
|
||||
Vector3 waypoint = Vector3.Lerp(p1, p2, t);
|
||||
|
||||
// 计算到路径终点的剩余距离
|
||||
float remainingDistance = rvo.To2D(waypoint - pos).magnitude + rvo.To2D(waypoint - p2).magnitude;
|
||||
for (int i = wp; i < vectorPath.Count - 1; i++)
|
||||
{
|
||||
remainingDistance += rvo.To2D(vectorPath[i + 1] - vectorPath[i]).magnitude;
|
||||
}
|
||||
|
||||
// 设置目标点和期望速度
|
||||
var rvoTarget = (waypoint - pos).normalized * remainingDistance + pos;
|
||||
var desiredSpeed = Mathf.Clamp01(remainingDistance / slowdownDistance) * maxSpeed;
|
||||
|
||||
// // 绘制一条从当前位置到路径点的红色线段用于调试
|
||||
// Debug.DrawLine(transform.position, waypoint, Color.red);
|
||||
|
||||
// 设置RVO控制器的目标点和速度
|
||||
rvo.SetTarget(rvoTarget, desiredSpeed, maxSpeed);
|
||||
}
|
||||
else
|
||||
{
|
||||
// 如果没有路径,则静止不动
|
||||
rvo.SetTarget(pos, maxSpeed, maxSpeed);
|
||||
}
|
||||
|
||||
// 从RVO控制器获取处理过的移动增量并移动角色
|
||||
var movementDelta = rvo.CalculateMovementDelta(Time.deltaTime);
|
||||
pos += movementDelta;
|
||||
|
||||
// 如果移动增量足够大,则旋转角色以面向移动方向
|
||||
if (Time.deltaTime > 0 && movementDelta.magnitude / Time.deltaTime > 0.01f)
|
||||
{
|
||||
var rot = transform.rotation;
|
||||
var targetRot = Quaternion.LookRotation(movementDelta, rvo.To3D(Vector2.zero, 1));
|
||||
const float RotationSpeed = 5;
|
||||
if (rvo.movementPlane == MovementPlane.XY)
|
||||
{
|
||||
targetRot = targetRot * Quaternion.Euler(-90, 180, 0);
|
||||
}
|
||||
transform.rotation = Quaternion.Slerp(rot, targetRot, Time.deltaTime * RotationSpeed);
|
||||
}
|
||||
|
||||
// 如果角色在XZ平面上移动,确保它保持在地面上
|
||||
if (rvo.movementPlane == MovementPlane.XZ)
|
||||
{
|
||||
RaycastHit hit;
|
||||
if (Physics.Raycast(pos + Vector3.up, Vector3.down, out hit, 2, groundMask))
|
||||
{
|
||||
pos.y = hit.point.y;
|
||||
}
|
||||
}
|
||||
|
||||
// 更新角色的位置
|
||||
transform.position = pos;
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a83c78eaa47b3244c9974793e439d257
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -1 +1 @@
|
||||
Build from PC-20230316NUNE at 2024/2/5 17:46:26
|
||||
Build from PC-20230316NUNE at 2024/2/6 18:56:03
|
@ -465,14 +465,24 @@
|
||||
<Compile Include="Assets\Game\Plugins\JNGame\BepuPhysics\Core\BepuPhysics1\BEPUphysics\CollisionTests\Manifolds\MobileMeshTriangleContactManifold.cs" />
|
||||
<Compile Include="Assets\Game\Plugins\JNGame\BepuPhysics\Core\BepuPhysics1\BEPUphysics\BroadPhaseEntries\Events\CollisionEventTypes.cs" />
|
||||
<Compile Include="Assets\Game\Plugins\JNGame\BepuPhysics\Core\BepuPhysics1\BEPUphysics\Entities\EntitySolverUpdateableCollection.cs" />
|
||||
<Compile Include="Assets\Game\Plugins\JNGame\Sync\Frame\AStar\JNAStarPath.cs" />
|
||||
<Compile Include="Assets\Game\Plugins\JNGame\Sync\Frame\AStar\RVO\JNRVOSimulator.cs" />
|
||||
<Compile Include="Assets\Game\Plugins\JNGame\Sync\Frame\AStar\JNAStarBase.cs" />
|
||||
<Compile Include="Assets\Game\Plugins\JNGame\Sync\Frame\AStar\RVO\JNRVOObstacle.cs" />
|
||||
<Compile Include="Assets\Game\Plugins\JNGame\Sync\Frame\AStar\RVO\JNRVOAgent.cs" />
|
||||
<Compile Include="Assets\Game\Plugins\JNGame\Sync\Frame\AStar\RVO\JNRVOQuadtree.cs" />
|
||||
<Compile Include="Assets\Game\Plugins\JNGame\Sync\Frame\AStar\Util\JNAStarMath.cs" />
|
||||
<Compile Include="Assets\Game\Plugins\JNGame\Sync\Frame\AStar\Util\Int3.cs" />
|
||||
<Compile Include="Assets\Game\Plugins\JNGame\Sync\Frame\AStar\AI\JNAISeeker.cs" />
|
||||
<Compile Include="Assets\Game\Plugins\JNGame\Sync\Frame\AStar\JNAStarClasses.cs" />
|
||||
<Compile Include="Assets\Game\Plugins\JNGame\Sync\Frame\AStar\Pathfinders\JNPath.cs" />
|
||||
<Compile Include="Assets\Game\Plugins\JNGame\Sync\Frame\AStar\Pathfinders\JNABPath.cs" />
|
||||
<Compile Include="Assets\Game\Plugins\JNGame\Sync\Frame\AStar\Pathfinders\JNMultiTargetPath.cs" />
|
||||
<Compile Include="Assets\Game\Plugins\JNGame\Sync\Frame\AStar\Modifier\Modifiers.cs" />
|
||||
<Compile Include="Assets\Game\Plugins\JNGame\Sync\Frame\AStar\Entity\PathReturnQueue.cs" />
|
||||
<Compile Include="Assets\Game\Plugins\JNGame\Sync\Frame\AStar\JNAStarPath.cs" />
|
||||
<Compile Include="Assets\Game\Plugins\JNGame\Sync\Frame\AStar\Entity\AStarData.cs" />
|
||||
<Compile Include="Assets\Game\Plugins\JNGame\Sync\Frame\AStar\Pathfinders\Processor\PathProcessor.cs" />
|
||||
<Compile Include="Assets\Game\Plugins\JNGame\Sync\Frame\AStar\Entity\Base.cs" />
|
||||
<Compile Include="Assets\Game\Plugins\JNGame\Sync\Frame\AStar\RVO\JNRVOController.cs" />
|
||||
<None Include="Assets\Game\Plugins\JNGame\BepuPhysics\Core\BepuPhysics2\BepuUtilities.2.3.4\lib\netstandard2.0\BepuUtilities.xml" />
|
||||
<None Include="Assets\Game\Plugins\JNGame\JNGame.asmdef" />
|
||||
<None Include="Assets\Game\Plugins\JNGame\BepuPhysics\Core\BepuPhysics2\BepuPhysics.2.3.4\lib\netstandard2.0\BepuPhysics.xml" />
|
||||
|
@ -7466,3 +7466,23 @@ AssetImportParameters requested are different than current active one (requested
|
||||
custom:container-demuxer-ogg: 62fdf1f143b41e24485cea50d1cbac27 ->
|
||||
custom:video-decoder-webm-vp8: 9c59270c3fd7afecdb556c50c9e8de78 ->
|
||||
custom:audio-decoder-ogg-vorbis: bf7c407c2cedff20999df2af8eb42d56 ->
|
||||
========================================================================
|
||||
Received Import Request.
|
||||
Time since last request: 81405.312634 seconds.
|
||||
path: Assets/Game/Plugins/AstarPathfindingProject/ExampleScenes/Example12_Procedural/ProceduralGround.prefab
|
||||
artifactKey: Guid(61432558c555740a38a88fa99d358883) Importer(815301076,1909f56bfc062723c751e8b465ee728b)
|
||||
Number of updated assets reloaded before import = 0
|
||||
Start importing Assets/Game/Plugins/AstarPathfindingProject/ExampleScenes/Example12_Procedural/ProceduralGround.prefab using Guid(61432558c555740a38a88fa99d358883) Importer(815301076,1909f56bfc062723c751e8b465ee728b) -> (artifact id: '974e2d7f64ace78ad7c6701b1a6f6f71') in 0.483827 seconds
|
||||
Number of asset objects unloaded after import = 8
|
||||
========================================================================
|
||||
Received Import Request.
|
||||
Time since last request: 0.000083 seconds.
|
||||
path: Assets/Game/Plugins/AstarPathfindingProject/ExampleScenes/Example12_Procedural/ProceduralPrefab4.prefab
|
||||
artifactKey: Guid(df2342a101fc54b44811414aaee023ba) Importer(815301076,1909f56bfc062723c751e8b465ee728b)
|
||||
Number of updated assets reloaded before import = 0
|
||||
Start importing Assets/Game/Plugins/AstarPathfindingProject/ExampleScenes/Example12_Procedural/ProceduralPrefab4.prefab using Guid(df2342a101fc54b44811414aaee023ba) Importer(815301076,1909f56bfc062723c751e8b465ee728b) -> (artifact id: 'f5e392f2814720230ef259dd8492e869') in 0.063671 seconds
|
||||
Number of asset objects unloaded after import = 30
|
||||
Editor requested this worker to shutdown with reason: Scaling down because of idle timeout
|
||||
AssetImportWorker is now disconnected from the server
|
||||
Process exiting
|
||||
Exiting without the bug reporter. Application will terminate with return code 0
|
@ -7615,3 +7615,531 @@ AssetImportParameters requested are different than current active one (requested
|
||||
custom:container-demuxer-ogg: 62fdf1f143b41e24485cea50d1cbac27 ->
|
||||
custom:video-decoder-webm-vp8: 9c59270c3fd7afecdb556c50c9e8de78 ->
|
||||
custom:audio-decoder-ogg-vorbis: bf7c407c2cedff20999df2af8eb42d56 ->
|
||||
========================================================================
|
||||
Received Import Request.
|
||||
Time since last request: 61256.560040 seconds.
|
||||
path: Assets/Game/Script/battle/mode/Example11_RVO/GRVO01WorldMode.cs
|
||||
artifactKey: Guid(e5b7cdf57c8619a40b108b66c4308c5e) Importer(815301076,1909f56bfc062723c751e8b465ee728b)
|
||||
Number of updated assets reloaded before import = 0
|
||||
Start importing Assets/Game/Script/battle/mode/Example11_RVO/GRVO01WorldMode.cs using Guid(e5b7cdf57c8619a40b108b66c4308c5e) Importer(815301076,1909f56bfc062723c751e8b465ee728b) -> (artifact id: '3bf23e69a8b4cad744476342960fb867') in 0.213777 seconds
|
||||
Number of asset objects unloaded after import = 0
|
||||
========================================================================
|
||||
Received Import Request.
|
||||
Time since last request: 2.880930 seconds.
|
||||
path: Assets/Game/Scenes/Mode/Example11_RVO/GRVO01World.unity
|
||||
artifactKey: Guid(6601635721611064e92978155e3f0134) Importer(815301076,1909f56bfc062723c751e8b465ee728b)
|
||||
Number of updated assets reloaded before import = 0
|
||||
Start importing Assets/Game/Scenes/Mode/Example11_RVO/GRVO01World.unity using Guid(6601635721611064e92978155e3f0134) Importer(815301076,1909f56bfc062723c751e8b465ee728b) -> (artifact id: '197a264e428b00b9efde92876807c65d') in 0.019280 seconds
|
||||
Number of asset objects unloaded after import = 0
|
||||
========================================================================
|
||||
Received Import Request.
|
||||
Time since last request: 781.419200 seconds.
|
||||
path: Assets/Game/Plugins/AstarPathfindingProject/ExampleScenes/Example12_Procedural/cylinder.fbx
|
||||
artifactKey: Guid(436b69414b04047fca3929c70df57c4f) Importer(815301076,1909f56bfc062723c751e8b465ee728b)
|
||||
Number of updated assets reloaded before import = 0
|
||||
Start importing Assets/Game/Plugins/AstarPathfindingProject/ExampleScenes/Example12_Procedural/cylinder.fbx using Guid(436b69414b04047fca3929c70df57c4f) Importer(815301076,1909f56bfc062723c751e8b465ee728b) -> (artifact id: '1df4dc13add956d3d56d442486a9ff7b') in 0.358806 seconds
|
||||
Number of asset objects unloaded after import = 10
|
||||
========================================================================
|
||||
Received Import Request.
|
||||
Time since last request: 0.000043 seconds.
|
||||
path: Assets/Game/Plugins/AstarPathfindingProject/ExampleScenes/Example12_Procedural/ProceduralPrefab3.prefab
|
||||
artifactKey: Guid(18cb121974c6b4be387c66d4e1ce5bf8) Importer(815301076,1909f56bfc062723c751e8b465ee728b)
|
||||
Number of updated assets reloaded before import = 0
|
||||
Start importing Assets/Game/Plugins/AstarPathfindingProject/ExampleScenes/Example12_Procedural/ProceduralPrefab3.prefab using Guid(18cb121974c6b4be387c66d4e1ce5bf8) Importer(815301076,1909f56bfc062723c751e8b465ee728b) -> (artifact id: 'c710b64fc1091c7ec96917384589f850') in 0.039924 seconds
|
||||
Number of asset objects unloaded after import = 25
|
||||
========================================================================
|
||||
Received Import Request.
|
||||
Time since last request: 0.000053 seconds.
|
||||
path: Assets/Game/Plugins/AstarPathfindingProject/ExampleScenes/Example12_Procedural/ProceduralPrefab2.prefab
|
||||
artifactKey: Guid(1c63e47cea3074ee89305fd4cefa91e8) Importer(815301076,1909f56bfc062723c751e8b465ee728b)
|
||||
Number of updated assets reloaded before import = 0
|
||||
Start importing Assets/Game/Plugins/AstarPathfindingProject/ExampleScenes/Example12_Procedural/ProceduralPrefab2.prefab using Guid(1c63e47cea3074ee89305fd4cefa91e8) Importer(815301076,1909f56bfc062723c751e8b465ee728b) -> (artifact id: '0dc4c21ffd1391ea49a05ae620a266c8') in 0.049531 seconds
|
||||
Number of asset objects unloaded after import = 22
|
||||
========================================================================
|
||||
Received Import Request.
|
||||
Time since last request: 0.000032 seconds.
|
||||
path: Assets/Game/Plugins/AstarPathfindingProject/ExampleScenes/Example12_Procedural/ProceduralPrefab1.prefab
|
||||
artifactKey: Guid(b11992e5e8afb4e63a1ccab9daf6f07c) Importer(815301076,1909f56bfc062723c751e8b465ee728b)
|
||||
Number of updated assets reloaded before import = 0
|
||||
Start importing Assets/Game/Plugins/AstarPathfindingProject/ExampleScenes/Example12_Procedural/ProceduralPrefab1.prefab using Guid(b11992e5e8afb4e63a1ccab9daf6f07c) Importer(815301076,1909f56bfc062723c751e8b465ee728b) -> (artifact id: 'f3b66f77e56d4b43927c84422b750352') in 0.025370 seconds
|
||||
Number of asset objects unloaded after import = 11
|
||||
========================================================================
|
||||
Received Import Request.
|
||||
Time since last request: 0.000074 seconds.
|
||||
path: Assets/Game/Plugins/AstarPathfindingProject/ExampleScenes/Example12_Procedural/TopDownOverlay.mat
|
||||
artifactKey: Guid(d3d92ca2f0e9e4bfb9c0fbe69453486a) Importer(815301076,1909f56bfc062723c751e8b465ee728b)
|
||||
Number of updated assets reloaded before import = 0
|
||||
Start importing Assets/Game/Plugins/AstarPathfindingProject/ExampleScenes/Example12_Procedural/TopDownOverlay.mat using Guid(d3d92ca2f0e9e4bfb9c0fbe69453486a) Importer(815301076,1909f56bfc062723c751e8b465ee728b) -> (artifact id: 'deab55d9ae4da808e8a6456ad7bed374') in 0.238849 seconds
|
||||
Number of asset objects unloaded after import = 1
|
||||
========================================================================
|
||||
Received Import Request.
|
||||
Time since last request: 9.757558 seconds.
|
||||
path: Assets/Game/Scenes/Mode/Example11_RVO/GRVO01World 1.unity
|
||||
artifactKey: Guid(20b9deb2a5e66a14bbd648adf2b7b9b2) Importer(815301076,1909f56bfc062723c751e8b465ee728b)
|
||||
Number of updated assets reloaded before import = 0
|
||||
Start importing Assets/Game/Scenes/Mode/Example11_RVO/GRVO01World 1.unity using Guid(20b9deb2a5e66a14bbd648adf2b7b9b2) Importer(815301076,1909f56bfc062723c751e8b465ee728b) -> (artifact id: '2c9ec15ce260b6b8888950054c9d3bf1') in 0.007192 seconds
|
||||
Number of asset objects unloaded after import = 0
|
||||
========================================================================
|
||||
Received Import Request.
|
||||
Time since last request: 6.387373 seconds.
|
||||
path: Assets/Game/Scenes/Mode/Example11_RVO/GRVO02World.unity
|
||||
artifactKey: Guid(20b9deb2a5e66a14bbd648adf2b7b9b2) Importer(815301076,1909f56bfc062723c751e8b465ee728b)
|
||||
Number of updated assets reloaded before import = 0
|
||||
Start importing Assets/Game/Scenes/Mode/Example11_RVO/GRVO02World.unity using Guid(20b9deb2a5e66a14bbd648adf2b7b9b2) Importer(815301076,1909f56bfc062723c751e8b465ee728b) -> (artifact id: '9e0f0850a167b58ac44249e62ca3580b') in 0.009667 seconds
|
||||
Number of asset objects unloaded after import = 0
|
||||
========================================================================
|
||||
Received Import Request.
|
||||
Time since last request: 723.400001 seconds.
|
||||
path: Assets/Game/Scenes/Mode/Example11_RVO/GRVO02World.unity
|
||||
artifactKey: Guid(20b9deb2a5e66a14bbd648adf2b7b9b2) Importer(815301076,1909f56bfc062723c751e8b465ee728b)
|
||||
Number of updated assets reloaded before import = 0
|
||||
Start importing Assets/Game/Scenes/Mode/Example11_RVO/GRVO02World.unity using Guid(20b9deb2a5e66a14bbd648adf2b7b9b2) Importer(815301076,1909f56bfc062723c751e8b465ee728b) -> (artifact id: '775422a609ce8f10d67ded90f80068ae') in 0.008393 seconds
|
||||
Number of asset objects unloaded after import = 0
|
||||
========================================================================
|
||||
Received Prepare
|
||||
Registering precompiled user dll's ...
|
||||
Registered in 0.018223 seconds.
|
||||
Begin MonoManager ReloadAssembly
|
||||
Native extension for WindowsStandalone target not found
|
||||
Native extension for Android target not found
|
||||
Refreshing native plugins compatible for Editor in 0.73 ms, found 3 plugins.
|
||||
Preloading 0 native plugins for Editor in 0.00 ms.
|
||||
[Package Manager] Server::EnsureServerProcessIsRunning -- launch failed, reason: Unity was launched with the -noUpm command-line argument
|
||||
[Package Manager] Cannot connect to Unity Package Manager local server
|
||||
Mono: successfully reloaded assembly
|
||||
- Completed reload, in 1.817 seconds
|
||||
Domain Reload Profiling:
|
||||
ReloadAssembly (1818ms)
|
||||
BeginReloadAssembly (459ms)
|
||||
ExecutionOrderSort (0ms)
|
||||
DisableScriptedObjects (9ms)
|
||||
BackupInstance (0ms)
|
||||
ReleaseScriptingObjects (0ms)
|
||||
CreateAndSetChildDomain (217ms)
|
||||
EndReloadAssembly (1248ms)
|
||||
LoadAssemblies (201ms)
|
||||
RebuildTransferFunctionScriptingTraits (0ms)
|
||||
SetupTypeCache (343ms)
|
||||
ReleaseScriptCaches (2ms)
|
||||
RebuildScriptCaches (41ms)
|
||||
SetupLoadedEditorAssemblies (690ms)
|
||||
LogAssemblyErrors (0ms)
|
||||
InitializePlatformSupportModulesInManaged (20ms)
|
||||
SetLoadedEditorAssemblies (0ms)
|
||||
RefreshPlugins (1ms)
|
||||
BeforeProcessingInitializeOnLoad (65ms)
|
||||
ProcessInitializeOnLoadAttributes (559ms)
|
||||
ProcessInitializeOnLoadMethodAttributes (33ms)
|
||||
AfterProcessingInitializeOnLoad (12ms)
|
||||
EditorAssembliesLoaded (0ms)
|
||||
ExecutionOrderSort2 (0ms)
|
||||
AwakeInstancesAfterBackupRestoration (10ms)
|
||||
Platform modules already initialized, skipping
|
||||
Refreshing native plugins compatible for Editor in 0.72 ms, found 3 plugins.
|
||||
Preloading 0 native plugins for Editor in 0.00 ms.
|
||||
Unloading 5894 Unused Serialized files (Serialized files now loaded: 0)
|
||||
Unloading 34 unused Assets / (22.0 KB). Loaded Objects now: 6786.
|
||||
Memory consumption went from 213.8 MB to 213.8 MB.
|
||||
Total: 3.451700 ms (FindLiveObjects: 0.469400 ms CreateObjectMapping: 0.193300 ms MarkObjects: 2.760200 ms DeleteObjects: 0.027600 ms)
|
||||
|
||||
AssetImportParameters requested are different than current active one (requested -> active):
|
||||
custom:video-decoder-ogg-theora: a1e56fd34408186e4bbccfd4996cb3dc ->
|
||||
custom:container-muxer-webm: aa71ff27fc2769a1b78a27578f13a17b ->
|
||||
custom:container-demuxer-webm: 4f35f7cbe854078d1ac9338744f61a02 ->
|
||||
custom:video-encoder-webm-vp8: eb34c28f22e8b96e1ab97ce403110664 ->
|
||||
custom:CustomObjectIndexerAttribute: bc11b3a6c3213fcdd17b65e7da85e133 ->
|
||||
custom:audio-encoder-webm-vorbis: bf7c407c2cedff20999df2af8eb42d56 ->
|
||||
custom:framework-win-MediaFoundation: 216162199b28c13a410421893ffa2e32 ->
|
||||
custom:SearchIndexIgnoredProperties: e643bd26f0fe6173181afceb89e7c659 ->
|
||||
custom:container-demuxer-ogg: 62fdf1f143b41e24485cea50d1cbac27 ->
|
||||
custom:video-decoder-webm-vp8: 9c59270c3fd7afecdb556c50c9e8de78 ->
|
||||
custom:audio-decoder-ogg-vorbis: bf7c407c2cedff20999df2af8eb42d56 ->
|
||||
========================================================================
|
||||
Received Prepare
|
||||
Registering precompiled user dll's ...
|
||||
Registered in 0.021171 seconds.
|
||||
Begin MonoManager ReloadAssembly
|
||||
Native extension for WindowsStandalone target not found
|
||||
Native extension for Android target not found
|
||||
Refreshing native plugins compatible for Editor in 1.07 ms, found 3 plugins.
|
||||
Preloading 0 native plugins for Editor in 0.00 ms.
|
||||
[Package Manager] Server::EnsureServerProcessIsRunning -- launch failed, reason: Unity was launched with the -noUpm command-line argument
|
||||
[Package Manager] Cannot connect to Unity Package Manager local server
|
||||
Mono: successfully reloaded assembly
|
||||
- Completed reload, in 1.593 seconds
|
||||
Domain Reload Profiling:
|
||||
ReloadAssembly (1594ms)
|
||||
BeginReloadAssembly (221ms)
|
||||
ExecutionOrderSort (0ms)
|
||||
DisableScriptedObjects (5ms)
|
||||
BackupInstance (0ms)
|
||||
ReleaseScriptingObjects (0ms)
|
||||
CreateAndSetChildDomain (72ms)
|
||||
EndReloadAssembly (1236ms)
|
||||
LoadAssemblies (149ms)
|
||||
RebuildTransferFunctionScriptingTraits (0ms)
|
||||
SetupTypeCache (364ms)
|
||||
ReleaseScriptCaches (2ms)
|
||||
RebuildScriptCaches (46ms)
|
||||
SetupLoadedEditorAssemblies (672ms)
|
||||
LogAssemblyErrors (0ms)
|
||||
InitializePlatformSupportModulesInManaged (23ms)
|
||||
SetLoadedEditorAssemblies (1ms)
|
||||
RefreshPlugins (1ms)
|
||||
BeforeProcessingInitializeOnLoad (61ms)
|
||||
ProcessInitializeOnLoadAttributes (539ms)
|
||||
ProcessInitializeOnLoadMethodAttributes (35ms)
|
||||
AfterProcessingInitializeOnLoad (13ms)
|
||||
EditorAssembliesLoaded (0ms)
|
||||
ExecutionOrderSort2 (0ms)
|
||||
AwakeInstancesAfterBackupRestoration (8ms)
|
||||
Platform modules already initialized, skipping
|
||||
Refreshing native plugins compatible for Editor in 0.80 ms, found 3 plugins.
|
||||
Preloading 0 native plugins for Editor in 0.00 ms.
|
||||
Unloading 5894 Unused Serialized files (Serialized files now loaded: 0)
|
||||
Unloading 34 unused Assets / (22.0 KB). Loaded Objects now: 6789.
|
||||
Memory consumption went from 213.8 MB to 213.8 MB.
|
||||
Total: 3.227900 ms (FindLiveObjects: 0.677100 ms CreateObjectMapping: 0.291700 ms MarkObjects: 2.234500 ms DeleteObjects: 0.023700 ms)
|
||||
|
||||
AssetImportParameters requested are different than current active one (requested -> active):
|
||||
custom:video-decoder-ogg-theora: a1e56fd34408186e4bbccfd4996cb3dc ->
|
||||
custom:container-muxer-webm: aa71ff27fc2769a1b78a27578f13a17b ->
|
||||
custom:container-demuxer-webm: 4f35f7cbe854078d1ac9338744f61a02 ->
|
||||
custom:video-encoder-webm-vp8: eb34c28f22e8b96e1ab97ce403110664 ->
|
||||
custom:CustomObjectIndexerAttribute: bc11b3a6c3213fcdd17b65e7da85e133 ->
|
||||
custom:audio-encoder-webm-vorbis: bf7c407c2cedff20999df2af8eb42d56 ->
|
||||
custom:framework-win-MediaFoundation: 216162199b28c13a410421893ffa2e32 ->
|
||||
custom:SearchIndexIgnoredProperties: e643bd26f0fe6173181afceb89e7c659 ->
|
||||
custom:container-demuxer-ogg: 62fdf1f143b41e24485cea50d1cbac27 ->
|
||||
custom:video-decoder-webm-vp8: 9c59270c3fd7afecdb556c50c9e8de78 ->
|
||||
custom:audio-decoder-ogg-vorbis: bf7c407c2cedff20999df2af8eb42d56 ->
|
||||
========================================================================
|
||||
Received Prepare
|
||||
Registering precompiled user dll's ...
|
||||
Registered in 0.021891 seconds.
|
||||
Begin MonoManager ReloadAssembly
|
||||
Native extension for WindowsStandalone target not found
|
||||
Native extension for Android target not found
|
||||
Refreshing native plugins compatible for Editor in 0.78 ms, found 3 plugins.
|
||||
Preloading 0 native plugins for Editor in 0.00 ms.
|
||||
[Package Manager] Server::EnsureServerProcessIsRunning -- launch failed, reason: Unity was launched with the -noUpm command-line argument
|
||||
[Package Manager] Cannot connect to Unity Package Manager local server
|
||||
Mono: successfully reloaded assembly
|
||||
- Completed reload, in 1.489 seconds
|
||||
Domain Reload Profiling:
|
||||
ReloadAssembly (1490ms)
|
||||
BeginReloadAssembly (184ms)
|
||||
ExecutionOrderSort (0ms)
|
||||
DisableScriptedObjects (4ms)
|
||||
BackupInstance (0ms)
|
||||
ReleaseScriptingObjects (0ms)
|
||||
CreateAndSetChildDomain (42ms)
|
||||
EndReloadAssembly (1177ms)
|
||||
LoadAssemblies (151ms)
|
||||
RebuildTransferFunctionScriptingTraits (0ms)
|
||||
SetupTypeCache (291ms)
|
||||
ReleaseScriptCaches (1ms)
|
||||
RebuildScriptCaches (35ms)
|
||||
SetupLoadedEditorAssemblies (693ms)
|
||||
LogAssemblyErrors (0ms)
|
||||
InitializePlatformSupportModulesInManaged (18ms)
|
||||
SetLoadedEditorAssemblies (0ms)
|
||||
RefreshPlugins (1ms)
|
||||
BeforeProcessingInitializeOnLoad (68ms)
|
||||
ProcessInitializeOnLoadAttributes (565ms)
|
||||
ProcessInitializeOnLoadMethodAttributes (29ms)
|
||||
AfterProcessingInitializeOnLoad (11ms)
|
||||
EditorAssembliesLoaded (0ms)
|
||||
ExecutionOrderSort2 (0ms)
|
||||
AwakeInstancesAfterBackupRestoration (8ms)
|
||||
Platform modules already initialized, skipping
|
||||
Refreshing native plugins compatible for Editor in 1.09 ms, found 3 plugins.
|
||||
Preloading 0 native plugins for Editor in 0.00 ms.
|
||||
Unloading 5894 Unused Serialized files (Serialized files now loaded: 0)
|
||||
Unloading 34 unused Assets / (21.9 KB). Loaded Objects now: 6792.
|
||||
Memory consumption went from 213.8 MB to 213.8 MB.
|
||||
Total: 3.174500 ms (FindLiveObjects: 0.513000 ms CreateObjectMapping: 0.354000 ms MarkObjects: 2.268800 ms DeleteObjects: 0.037000 ms)
|
||||
|
||||
AssetImportParameters requested are different than current active one (requested -> active):
|
||||
custom:video-decoder-ogg-theora: a1e56fd34408186e4bbccfd4996cb3dc ->
|
||||
custom:container-muxer-webm: aa71ff27fc2769a1b78a27578f13a17b ->
|
||||
custom:container-demuxer-webm: 4f35f7cbe854078d1ac9338744f61a02 ->
|
||||
custom:video-encoder-webm-vp8: eb34c28f22e8b96e1ab97ce403110664 ->
|
||||
custom:CustomObjectIndexerAttribute: bc11b3a6c3213fcdd17b65e7da85e133 ->
|
||||
custom:audio-encoder-webm-vorbis: bf7c407c2cedff20999df2af8eb42d56 ->
|
||||
custom:framework-win-MediaFoundation: 216162199b28c13a410421893ffa2e32 ->
|
||||
custom:SearchIndexIgnoredProperties: e643bd26f0fe6173181afceb89e7c659 ->
|
||||
custom:container-demuxer-ogg: 62fdf1f143b41e24485cea50d1cbac27 ->
|
||||
custom:video-decoder-webm-vp8: 9c59270c3fd7afecdb556c50c9e8de78 ->
|
||||
custom:audio-decoder-ogg-vorbis: bf7c407c2cedff20999df2af8eb42d56 ->
|
||||
========================================================================
|
||||
Received Prepare
|
||||
Registering precompiled user dll's ...
|
||||
Registered in 0.020331 seconds.
|
||||
Begin MonoManager ReloadAssembly
|
||||
Native extension for WindowsStandalone target not found
|
||||
Native extension for Android target not found
|
||||
Refreshing native plugins compatible for Editor in 1.30 ms, found 3 plugins.
|
||||
Preloading 0 native plugins for Editor in 0.00 ms.
|
||||
[Package Manager] Server::EnsureServerProcessIsRunning -- launch failed, reason: Unity was launched with the -noUpm command-line argument
|
||||
[Package Manager] Cannot connect to Unity Package Manager local server
|
||||
Mono: successfully reloaded assembly
|
||||
- Completed reload, in 2.043 seconds
|
||||
Domain Reload Profiling:
|
||||
ReloadAssembly (2044ms)
|
||||
BeginReloadAssembly (232ms)
|
||||
ExecutionOrderSort (0ms)
|
||||
DisableScriptedObjects (7ms)
|
||||
BackupInstance (0ms)
|
||||
ReleaseScriptingObjects (0ms)
|
||||
CreateAndSetChildDomain (61ms)
|
||||
EndReloadAssembly (1708ms)
|
||||
LoadAssemblies (160ms)
|
||||
RebuildTransferFunctionScriptingTraits (0ms)
|
||||
SetupTypeCache (338ms)
|
||||
ReleaseScriptCaches (2ms)
|
||||
RebuildScriptCaches (95ms)
|
||||
SetupLoadedEditorAssemblies (1102ms)
|
||||
LogAssemblyErrors (0ms)
|
||||
InitializePlatformSupportModulesInManaged (23ms)
|
||||
SetLoadedEditorAssemblies (1ms)
|
||||
RefreshPlugins (1ms)
|
||||
BeforeProcessingInitializeOnLoad (255ms)
|
||||
ProcessInitializeOnLoadAttributes (780ms)
|
||||
ProcessInitializeOnLoadMethodAttributes (30ms)
|
||||
AfterProcessingInitializeOnLoad (13ms)
|
||||
EditorAssembliesLoaded (0ms)
|
||||
ExecutionOrderSort2 (0ms)
|
||||
AwakeInstancesAfterBackupRestoration (9ms)
|
||||
Platform modules already initialized, skipping
|
||||
Refreshing native plugins compatible for Editor in 1.70 ms, found 3 plugins.
|
||||
Preloading 0 native plugins for Editor in 0.00 ms.
|
||||
Unloading 5894 Unused Serialized files (Serialized files now loaded: 0)
|
||||
Unloading 34 unused Assets / (22.0 KB). Loaded Objects now: 6795.
|
||||
Memory consumption went from 213.8 MB to 213.8 MB.
|
||||
Total: 3.275000 ms (FindLiveObjects: 0.781600 ms CreateObjectMapping: 0.450300 ms MarkObjects: 2.004300 ms DeleteObjects: 0.036800 ms)
|
||||
|
||||
AssetImportParameters requested are different than current active one (requested -> active):
|
||||
custom:video-decoder-ogg-theora: a1e56fd34408186e4bbccfd4996cb3dc ->
|
||||
custom:container-muxer-webm: aa71ff27fc2769a1b78a27578f13a17b ->
|
||||
custom:container-demuxer-webm: 4f35f7cbe854078d1ac9338744f61a02 ->
|
||||
custom:video-encoder-webm-vp8: eb34c28f22e8b96e1ab97ce403110664 ->
|
||||
custom:CustomObjectIndexerAttribute: bc11b3a6c3213fcdd17b65e7da85e133 ->
|
||||
custom:audio-encoder-webm-vorbis: bf7c407c2cedff20999df2af8eb42d56 ->
|
||||
custom:framework-win-MediaFoundation: 216162199b28c13a410421893ffa2e32 ->
|
||||
custom:SearchIndexIgnoredProperties: e643bd26f0fe6173181afceb89e7c659 ->
|
||||
custom:container-demuxer-ogg: 62fdf1f143b41e24485cea50d1cbac27 ->
|
||||
custom:video-decoder-webm-vp8: 9c59270c3fd7afecdb556c50c9e8de78 ->
|
||||
custom:audio-decoder-ogg-vorbis: bf7c407c2cedff20999df2af8eb42d56 ->
|
||||
========================================================================
|
||||
Received Prepare
|
||||
Registering precompiled user dll's ...
|
||||
Registered in 0.021569 seconds.
|
||||
Begin MonoManager ReloadAssembly
|
||||
Native extension for WindowsStandalone target not found
|
||||
Native extension for Android target not found
|
||||
Refreshing native plugins compatible for Editor in 1.34 ms, found 3 plugins.
|
||||
Preloading 0 native plugins for Editor in 0.00 ms.
|
||||
[Package Manager] Server::EnsureServerProcessIsRunning -- launch failed, reason: Unity was launched with the -noUpm command-line argument
|
||||
[Package Manager] Cannot connect to Unity Package Manager local server
|
||||
Mono: successfully reloaded assembly
|
||||
- Completed reload, in 1.512 seconds
|
||||
Domain Reload Profiling:
|
||||
ReloadAssembly (1512ms)
|
||||
BeginReloadAssembly (192ms)
|
||||
ExecutionOrderSort (0ms)
|
||||
DisableScriptedObjects (7ms)
|
||||
BackupInstance (0ms)
|
||||
ReleaseScriptingObjects (0ms)
|
||||
CreateAndSetChildDomain (54ms)
|
||||
EndReloadAssembly (1200ms)
|
||||
LoadAssemblies (146ms)
|
||||
RebuildTransferFunctionScriptingTraits (0ms)
|
||||
SetupTypeCache (310ms)
|
||||
ReleaseScriptCaches (1ms)
|
||||
RebuildScriptCaches (50ms)
|
||||
SetupLoadedEditorAssemblies (668ms)
|
||||
LogAssemblyErrors (0ms)
|
||||
InitializePlatformSupportModulesInManaged (20ms)
|
||||
SetLoadedEditorAssemblies (1ms)
|
||||
RefreshPlugins (1ms)
|
||||
BeforeProcessingInitializeOnLoad (72ms)
|
||||
ProcessInitializeOnLoadAttributes (537ms)
|
||||
ProcessInitializeOnLoadMethodAttributes (25ms)
|
||||
AfterProcessingInitializeOnLoad (12ms)
|
||||
EditorAssembliesLoaded (0ms)
|
||||
ExecutionOrderSort2 (0ms)
|
||||
AwakeInstancesAfterBackupRestoration (8ms)
|
||||
Platform modules already initialized, skipping
|
||||
Callback registration failed. Increase kMaxCallback.
|
||||
Fatal Error! Callback registration failed. Increase kMaxCallback.
|
||||
Crash!!!
|
||||
SymInit: Symbol-SearchPath: 'D:/Unity/2021.3.33f1c1/Editor/Data/Mono;.;D:\myproject\JisolGame\JNFrame;D:\myproject\JisolGame\JNFrame\Library\BurstCache\JIT;D:\Unity\2021.3.33f1c1\Editor;C:\WINDOWS;C:\WINDOWS\system32;', symOptions: 534, UserName: 'Administrator'
|
||||
OS-Version: 10.0.0
|
||||
D:\Unity\2021.3.33f1c1\Editor\Unity.exe:Unity.exe (00007FF7BE9F0000), size: 81158144 (result: 0), SymType: '-deferred-', PDB: '', fileVersion: 2021.3.33.11165
|
||||
C:\WINDOWS\SYSTEM32\ntdll.dll:ntdll.dll (00007FFE5F330000), size: 2191360 (result: 0), SymType: '-deferred-', PDB: '', fileVersion: 10.0.22621.2506
|
||||
C:\WINDOWS\System32\KERNEL32.DLL:KERNEL32.DLL (00007FFE5E4C0000), size: 802816 (result: 0), SymType: '-deferred-', PDB: '', fileVersion: 10.0.22621.2506
|
||||
C:\WINDOWS\System32\KERNELBASE.dll:KERNELBASE.dll (00007FFE5C670000), size: 3825664 (result: 0), SymType: '-deferred-', PDB: '', fileVersion: 10.0.22621.2792
|
||||
C:\WINDOWS\System32\user32.dll:user32.dll (00007FFE5F130000), size: 1761280 (result: 0), SymType: '-deferred-', PDB: '', fileVersion: 10.0.22621.2506
|
||||
C:\WINDOWS\System32\win32u.dll:win32u.dll (00007FFE5CF60000), size: 155648 (result: 0), SymType: '-deferred-', PDB: '', fileVersion: 10.0.22621.3007
|
||||
C:\WINDOWS\System32\GDI32.dll:GDI32.dll (00007FFE5EAF0000), size: 167936 (result: 0), SymType: '-deferred-', PDB: '', fileVersion: 10.0.22621.2792
|
||||
C:\WINDOWS\System32\gdi32full.dll:gdi32full.dll (00007FFE5CC60000), size: 1146880 (result: 0), SymType: '-deferred-', PDB: '', fileVersion: 10.0.22621.2861
|
||||
C:\WINDOWS\System32\msvcp_win.dll:msvcp_win.dll (00007FFE5CA20000), size: 630784 (result: 0), SymType: '-deferred-', PDB: '', fileVersion: 10.0.22621.2506
|
||||
C:\WINDOWS\System32\ucrtbase.dll:ucrtbase.dll (00007FFE5CB40000), size: 1118208 (result: 0), SymType: '-deferred-', PDB: '', fileVersion: 10.0.22621.2506
|
||||
C:\WINDOWS\System32\advapi32.dll:advapi32.dll (00007FFE5D9C0000), size: 733184 (result: 0), SymType: '-deferred-', PDB: '', fileVersion: 10.0.22621.3007
|
||||
C:\WINDOWS\System32\msvcrt.dll:msvcrt.dll (00007FFE5E820000), size: 684032 (result: 0), SymType: '-deferred-', PDB: '', fileVersion: 7.0.22621.2506
|
||||
C:\WINDOWS\System32\sechost.dll:sechost.dll (00007FFE5EB20000), size: 688128 (result: 0), SymType: '-deferred-', PDB: '', fileVersion: 10.0.22621.3007
|
||||
C:\WINDOWS\System32\bcrypt.dll:bcrypt.dll (00007FFE5D050000), size: 163840 (result: 0), SymType: '-deferred-', PDB: '', fileVersion: 10.0.22621.2506
|
||||
C:\WINDOWS\System32\RPCRT4.dll:RPCRT4.dll (00007FFE5DE30000), size: 1142784 (result: 0), SymType: '-deferred-', PDB: '', fileVersion: 10.0.22621.2792
|
||||
C:\WINDOWS\System32\shell32.dll:shell32.dll (00007FFE5D080000), size: 8757248 (result: 0), SymType: '-deferred-', PDB: '', fileVersion: 10.0.22621.3007
|
||||
C:\WINDOWS\System32\setupapi.dll:setupapi.dll (00007FFE5EBD0000), size: 4669440 (result: 0), SymType: '-deferred-', PDB: '', fileVersion: 10.0.22621.2506
|
||||
C:\WINDOWS\System32\psapi.dll:psapi.dll (00007FFE5F2E0000), size: 32768 (result: 0), SymType: '-deferred-', PDB: '', fileVersion: 10.0.22621.1
|
||||
C:\WINDOWS\SYSTEM32\iphlpapi.dll:iphlpapi.dll (00007FFE5B190000), size: 184320 (result: 0), SymType: '-deferred-', PDB: '', fileVersion: 10.0.22621.1
|
||||
C:\WINDOWS\SYSTEM32\hid.dll:hid.dll (00007FFE5AEC0000), size: 57344 (result: 0), SymType: '-deferred-', PDB: '', fileVersion: 10.0.22621.1
|
||||
C:\WINDOWS\System32\WS2_32.dll:WS2_32.dll (00007FFE5E960000), size: 462848 (result: 0), SymType: '-deferred-', PDB: '', fileVersion: 10.0.22621.1
|
||||
C:\WINDOWS\System32\WINTRUST.dll:WINTRUST.dll (00007FFE5CEF0000), size: 438272 (result: 0), SymType: '-deferred-', PDB: '', fileVersion: 10.0.22621.3007
|
||||
C:\WINDOWS\System32\OLEAUT32.dll:OLEAUT32.dll (00007FFE5D8E0000), size: 880640 (result: 0), SymType: '-deferred-', PDB: '', fileVersion: 10.0.22621.2506
|
||||
C:\WINDOWS\SYSTEM32\dhcpcsvc6.dll:dhcpcsvc6.dll (00007FFE56E70000), size: 102400 (result: 0), SymType: '-deferred-', PDB: '', fileVersion: 10.0.22621.2506
|
||||
C:\WINDOWS\SYSTEM32\dhcpcsvc.dll:dhcpcsvc.dll (00007FFE56E50000), size: 126976 (result: 0), SymType: '-deferred-', PDB: '', fileVersion: 10.0.22621.2506
|
||||
C:\WINDOWS\SYSTEM32\wsock32.dll:wsock32.dll (00007FFE53040000), size: 36864 (result: 0), SymType: '-deferred-', PDB: '', fileVersion: 10.0.22621.1
|
||||
C:\WINDOWS\System32\combase.dll:combase.dll (00007FFE5DF50000), size: 3706880 (result: 0), SymType: '-deferred-', PDB: '', fileVersion: 10.0.22621.2792
|
||||
D:\Unity\2021.3.33f1c1\Editor\optix.6.0.0.dll:optix.6.0.0.dll (00007FFE280B0000), size: 208896 (result: 0), SymType: '-deferred-', PDB: '', fileVersion: 6.0.0.0
|
||||
D:\Unity\2021.3.33f1c1\Editor\s3tcompress.dll:s3tcompress.dll (00007FFE280F0000), size: 180224 (result: 0), SymType: '-deferred-', PDB: ''
|
||||
C:\WINDOWS\System32\IMM32.dll:IMM32.dll (00007FFE5DC20000), size: 200704 (result: 0), SymType: '-deferred-', PDB: '', fileVersion: 10.0.22621.2792
|
||||
D:\Unity\2021.3.33f1c1\Editor\libfbxsdk.dll:libfbxsdk.dll (00007FFDF02B0000), size: 10067968 (result: 0), SymType: '-deferred-', PDB: '', fileVersion: 2020.3.3.0
|
||||
C:\WINDOWS\System32\ole32.dll:ole32.dll (00007FFE5DA80000), size: 1703936 (result: 0), SymType: '-deferred-', PDB: '', fileVersion: 10.0.22621.2506
|
||||
D:\Unity\2021.3.33f1c1\Editor\etccompress.dll:etccompress.dll (00007FFDF3F00000), size: 5066752 (result: 0), SymType: '-deferred-', PDB: ''
|
||||
C:\WINDOWS\System32\SHLWAPI.dll:SHLWAPI.dll (00007FFE5F0D0000), size: 385024 (result: 0), SymType: '-deferred-', PDB: '', fileVersion: 10.0.22621.2506
|
||||
C:\WINDOWS\System32\CRYPT32.dll:CRYPT32.dll (00007FFE5CD80000), size: 1466368 (result: 0), SymType: '-deferred-', PDB: '', fileVersion: 10.0.22621.2506
|
||||
D:\Unity\2021.3.33f1c1\Editor\ispc_texcomp.dll:ispc_texcomp.dll (00007FFDF4540000), size: 1826816 (result: 0), SymType: '-deferred-', PDB: ''
|
||||
D:\Unity\2021.3.33f1c1\Editor\FreeImage.dll:FreeImage.dll (0000000180000000), size: 6582272 (result: 0), SymType: '-deferred-', PDB: '', fileVersion: 3.18.0.0
|
||||
D:\Unity\2021.3.33f1c1\Editor\compress_bc7e.dll:compress_bc7e.dll (00007FFDF43E0000), size: 1433600 (result: 0), SymType: '-deferred-', PDB: ''
|
||||
D:\Unity\2021.3.33f1c1\Editor\OpenImageDenoise.dll:OpenImageDenoise.dll (00007FFDF1060000), size: 48848896 (result: 0), SymType: '-deferred-', PDB: '', fileVersion: 1.4.2.0
|
||||
D:\Unity\2021.3.33f1c1\Editor\WinPixEventRuntime.dll:WinPixEventRuntime.dll (00007FFE57980000), size: 45056 (result: 0), SymType: '-deferred-', PDB: '', fileVersion: 1.0.1812.6001
|
||||
D:\Unity\2021.3.33f1c1\Editor\umbraoptimizer64.dll:umbraoptimizer64.dll (00007FFDF0F30000), size: 1187840 (result: 0), SymType: '-deferred-', PDB: ''
|
||||
D:\Unity\2021.3.33f1c1\Editor\RadeonImageFilters.dll:RadeonImageFilters.dll (00007FFDF0C50000), size: 2961408 (result: 0), SymType: '-deferred-', PDB: '', fileVersion: 1.7.0.0
|
||||
D:\Unity\2021.3.33f1c1\Editor\SketchUpAPI.dll:SketchUpAPI.dll (00007FFDEFA10000), size: 8990720 (result: 0), SymType: '-deferred-', PDB: '', fileVersion: 23.0.0.0
|
||||
C:\WINDOWS\SYSTEM32\VERSION.dll:VERSION.dll (00007FFE56350000), size: 40960 (result: 0), SymType: '-deferred-', PDB: '', fileVersion: 10.0.22621.1
|
||||
C:\WINDOWS\SYSTEM32\dwmapi.dll:dwmapi.dll (00007FFE5A010000), size: 176128 (result: 0), SymType: '-deferred-', PDB: '', fileVersion: 10.0.22621.2506
|
||||
C:\WINDOWS\SYSTEM32\WINMM.dll:WINMM.dll (00007FFE52CC0000), size: 212992 (result: 0), SymType: '-deferred-', PDB: '', fileVersion: 10.0.22621.2506
|
||||
C:\WINDOWS\SYSTEM32\WINHTTP.dll:WINHTTP.dll (00007FFE57070000), size: 1273856 (result: 0), SymType: '-deferred-', PDB: '', fileVersion: 10.0.22621.2506
|
||||
C:\WINDOWS\SYSTEM32\GLU32.dll:GLU32.dll (00007FFE4EA20000), size: 184320 (result: 0), SymType: '-deferred-', PDB: '', fileVersion: 10.0.22621.2506
|
||||
C:\WINDOWS\SYSTEM32\OPENGL32.dll:OPENGL32.dll (00007FFE26D90000), size: 1048576 (result: 0), SymType: '-deferred-', PDB: '', fileVersion: 10.0.22621.2506
|
||||
D:\Unity\2021.3.33f1c1\Editor\RadeonML.dll:RadeonML.dll (00007FFE28020000), size: 94208 (result: 0), SymType: '-deferred-', PDB: '', fileVersion: 0.9.11.0
|
||||
C:\WINDOWS\SYSTEM32\MSVCP140.dll:MSVCP140.dll (00007FFE33F20000), size: 581632 (result: 0), SymType: '-deferred-', PDB: '', fileVersion: 14.34.31931.0
|
||||
D:\Unity\2021.3.33f1c1\Editor\SketchUpCommonPreferences.dll:SketchUpCommonPreferences.dll (00007FFDEE950000), size: 499712 (result: 0), SymType: '-deferred-', PDB: '', fileVersion: 23.0.0.0
|
||||
C:\WINDOWS\SYSTEM32\VCRUNTIME140.dll:VCRUNTIME140.dll (00007FFE4E5D0000), size: 110592 (result: 0), SymType: '-deferred-', PDB: '', fileVersion: 14.34.31931.0
|
||||
C:\WINDOWS\SYSTEM32\VCRUNTIME140_1.dll:VCRUNTIME140_1.dll (00007FFE3FD30000), size: 49152 (result: 0), SymType: '-deferred-', PDB: '', fileVersion: 14.34.31931.0
|
||||
C:\WINDOWS\SYSTEM32\Secur32.dll:Secur32.dll (00007FFE5B560000), size: 49152 (result: 0), SymType: '-deferred-', PDB: '', fileVersion: 10.0.22621.1
|
||||
D:\Unity\2021.3.33f1c1\Editor\tbb12.dll:tbb12.dll (00007FFE28040000), size: 434176 (result: 0), SymType: '-deferred-', PDB: ''
|
||||
C:\WINDOWS\SYSTEM32\dxcore.dll:dxcore.dll (00007FFE59CE0000), size: 221184 (result: 0), SymType: '-deferred-', PDB: '', fileVersion: 10.0.22621.2506
|
||||
C:\WINDOWS\SYSTEM32\SSPICLI.DLL:SSPICLI.DLL (00007FFE5B9F0000), size: 274432 (result: 0), SymType: '-deferred-', PDB: '', fileVersion: 10.0.22621.3007
|
||||
D:\Unity\2021.3.33f1c1\Editor\tbbmalloc.dll:tbbmalloc.dll (00007FFDEF9C0000), size: 282624 (result: 0), SymType: '-deferred-', PDB: ''
|
||||
D:\Unity\2021.3.33f1c1\Editor\OpenRL.dll:OpenRL.dll (0000019CBB170000), size: 12779520 (result: 0), SymType: '-deferred-', PDB: '', fileVersion: 1.5.0.2907
|
||||
D:\Unity\2021.3.33f1c1\Editor\embree.dll:embree.dll (00007FFDEE9D0000), size: 16711680 (result: 0), SymType: '-deferred-', PDB: '', fileVersion: 2.14.0.0
|
||||
C:\WINDOWS\SYSTEM32\MSVCP100.dll:MSVCP100.dll (000000005C420000), size: 622592 (result: 0), SymType: '-deferred-', PDB: '', fileVersion: 10.0.40219.325
|
||||
C:\WINDOWS\SYSTEM32\MSVCR100.dll:MSVCR100.dll (000000005B680000), size: 860160 (result: 0), SymType: '-deferred-', PDB: '', fileVersion: 10.0.40219.325
|
||||
D:\Unity\2021.3.33f1c1\Editor\tbb.dll:tbb.dll (00007FFDEE8E0000), size: 413696 (result: 0), SymType: '-deferred-', PDB: '', fileVersion: 2017.0.2016.1004
|
||||
C:\WINDOWS\SYSTEM32\MSVCP120.dll:MSVCP120.dll (00007FFDEE740000), size: 679936 (result: 0), SymType: '-deferred-', PDB: '', fileVersion: 12.0.40649.5
|
||||
C:\WINDOWS\SYSTEM32\MSVCR120.dll:MSVCR120.dll (00007FFDEE7F0000), size: 978944 (result: 0), SymType: '-deferred-', PDB: '', fileVersion: 12.0.40649.5
|
||||
D:\Unity\2021.3.33f1c1\Editor\OpenRL_pthread.dll:OpenRL_pthread.dll (0000019CBBDC0000), size: 61440 (result: 0), SymType: '-deferred-', PDB: '', fileVersion: 2.9.0.0
|
||||
C:\WINDOWS\SYSTEM32\MSASN1.dll:MSASN1.dll (00007FFE5BEC0000), size: 73728 (result: 0), SymType: '-deferred-', PDB: '', fileVersion: 10.0.22621.2506
|
||||
C:\WINDOWS\SYSTEM32\CRYPTSP.dll:CRYPTSP.dll (00007FFE5BE60000), size: 110592 (result: 0), SymType: '-deferred-', PDB: '', fileVersion: 10.0.22621.2506
|
||||
C:\WINDOWS\system32\rsaenh.dll:rsaenh.dll (00007FFE5B6F0000), size: 217088 (result: 0), SymType: '-deferred-', PDB: '', fileVersion: 10.0.22621.1
|
||||
C:\WINDOWS\SYSTEM32\CRYPTBASE.dll:CRYPTBASE.dll (00007FFE5BE80000), size: 49152 (result: 0), SymType: '-deferred-', PDB: '', fileVersion: 10.0.22621.1
|
||||
C:\WINDOWS\System32\bcryptPrimitives.dll:bcryptPrimitives.dll (00007FFE5CAC0000), size: 499712 (result: 0), SymType: '-deferred-', PDB: '', fileVersion: 10.0.22621.2506
|
||||
C:\WINDOWS\SYSTEM32\MSWSOCK.DLL:MSWSOCK.DLL (00007FFE5BC10000), size: 430080 (result: 0), SymType: '-deferred-', PDB: '', fileVersion: 10.0.22621.2506
|
||||
C:\WINDOWS\SYSTEM32\cfgmgr32.DLL:cfgmgr32.DLL (00007FFE5C360000), size: 319488 (result: 0), SymType: '-deferred-', PDB: '', fileVersion: 10.0.22621.2506
|
||||
C:\WINDOWS\SYSTEM32\kernel.appcore.dll:kernel.appcore.dll (00007FFE5B790000), size: 98304 (result: 0), SymType: '-deferred-', PDB: '', fileVersion: 10.0.22621.2715
|
||||
C:\WINDOWS\system32\uxtheme.dll:uxtheme.dll (00007FFE59BE0000), size: 700416 (result: 0), SymType: '-deferred-', PDB: '', fileVersion: 10.0.22621.3007
|
||||
C:\WINDOWS\System32\shcore.dll:shcore.dll (00007FFE5DD30000), size: 995328 (result: 0), SymType: '-deferred-', PDB: '', fileVersion: 10.0.22621.2715
|
||||
C:\WINDOWS\SYSTEM32\windows.storage.dll:windows.storage.dll (00007FFE5A5C0000), size: 9396224 (result: 0), SymType: '-deferred-', PDB: '', fileVersion: 10.0.22621.2792
|
||||
C:\WINDOWS\SYSTEM32\wintypes.dll:wintypes.dll (00007FFE5A480000), size: 1302528 (result: 0), SymType: '-deferred-', PDB: '', fileVersion: 10.0.22621.2792
|
||||
C:\WINDOWS\SYSTEM32\profapi.dll:profapi.dll (00007FFE5C5A0000), size: 155648 (result: 0), SymType: '-deferred-', PDB: '', fileVersion: 10.0.22621.2506
|
||||
C:\WINDOWS\system32\IconCodecService.dll:IconCodecService.dll (00007FFE3F2E0000), size: 36864 (result: 0), SymType: '-deferred-', PDB: '', fileVersion: 10.0.22621.1
|
||||
C:\WINDOWS\SYSTEM32\WindowsCodecs.dll:WindowsCodecs.dll (00007FFE57F40000), size: 1769472 (result: 0), SymType: '-deferred-', PDB: '', fileVersion: 10.0.22621.2506
|
||||
C:\WINDOWS\System32\clbcatq.dll:clbcatq.dll (00007FFE5E5B0000), size: 720896 (result: 0), SymType: '-deferred-', PDB: '', fileVersion: 2001.12.10941.16384
|
||||
C:\WINDOWS\System32\netprofm.dll:netprofm.dll (00007FFE57BD0000), size: 491520 (result: 0), SymType: '-deferred-', PDB: '', fileVersion: 10.0.22621.2506
|
||||
C:\WINDOWS\System32\npmproxy.dll:npmproxy.dll (00007FFE56360000), size: 98304 (result: 0), SymType: '-deferred-', PDB: '', fileVersion: 10.0.22621.2506
|
||||
C:\WINDOWS\System32\NSI.dll:NSI.dll (00007FFE5E950000), size: 36864 (result: 0), SymType: '-deferred-', PDB: '', fileVersion: 10.0.22621.1
|
||||
C:\WINDOWS\SYSTEM32\DNSAPI.dll:DNSAPI.dll (00007FFE5B210000), size: 1019904 (result: 0), SymType: '-deferred-', PDB: '', fileVersion: 10.0.22621.2506
|
||||
C:\WINDOWS\system32\napinsp.dll:napinsp.dll (00007FFE3DAA0000), size: 94208 (result: 0), SymType: '-deferred-', PDB: '', fileVersion: 10.0.22621.1
|
||||
C:\WINDOWS\system32\pnrpnsp.dll:pnrpnsp.dll (00007FFE3DA40000), size: 110592 (result: 0), SymType: '-deferred-', PDB: '', fileVersion: 10.0.22621.1
|
||||
C:\WINDOWS\System32\winrnr.dll:winrnr.dll (00007FFE3DA20000), size: 69632 (result: 0), SymType: '-deferred-', PDB: '', fileVersion: 10.0.22621.1
|
||||
C:\WINDOWS\system32\wshbth.dll:wshbth.dll (00007FFE3DA00000), size: 86016 (result: 0), SymType: '-deferred-', PDB: '', fileVersion: 10.0.22621.2506
|
||||
C:\WINDOWS\system32\nlansp_c.dll:nlansp_c.dll (00007FFE3D9D0000), size: 135168 (result: 0), SymType: '-deferred-', PDB: '', fileVersion: 10.0.22621.2506
|
||||
C:\WINDOWS\System32\fwpuclnt.dll:fwpuclnt.dll (00007FFE569D0000), size: 536576 (result: 0), SymType: '-deferred-', PDB: '', fileVersion: 10.0.22621.2792
|
||||
C:\Windows\System32\rasadhlp.dll:rasadhlp.dll (00007FFE54060000), size: 40960 (result: 0), SymType: '-deferred-', PDB: '', fileVersion: 10.0.22621.1
|
||||
D:\Unity\2021.3.33f1c1\Editor\NVUnityPlugin.DLL:NVUnityPlugin.DLL (00007FFDE79B0000), size: 1536000 (result: 0), SymType: '-deferred-', PDB: ''
|
||||
D:\Unity\2021.3.33f1c1\Editor\Data\Tools\astcenc-avx2.dll:astcenc-avx2.dll (00007FFDE7920000), size: 561152 (result: 0), SymType: '-deferred-', PDB: ''
|
||||
C:\WINDOWS\SYSTEM32\d3d11.dll:d3d11.dll (00007FFE58D50000), size: 2453504 (result: 0), SymType: '-deferred-', PDB: '', fileVersion: 10.0.22621.2506
|
||||
C:\WINDOWS\SYSTEM32\dxgi.dll:dxgi.dll (00007FFE59D30000), size: 1015808 (result: 0), SymType: '-deferred-', PDB: '', fileVersion: 10.0.22621.2506
|
||||
C:\WINDOWS\SYSTEM32\directxdatabasehelper.dll:directxdatabasehelper.dll (00007FFE56AF0000), size: 303104 (result: 0), SymType: '-deferred-', PDB: '', fileVersion: 10.0.22621.2506
|
||||
C:\WINDOWS\System32\DriverStore\FileRepository\nv_dispig.inf_amd64_7e5fd280efaa5445\nvldumdx.dll:nvldumdx.dll (00007FFE534C0000), size: 770048 (result: 0), SymType: '-deferred-', PDB: '', fileVersion: 31.0.15.3623
|
||||
C:\WINDOWS\SYSTEM32\cryptnet.dll:cryptnet.dll (00007FFE55610000), size: 204800 (result: 0), SymType: '-deferred-', PDB: '', fileVersion: 10.0.22621.1
|
||||
C:\WINDOWS\SYSTEM32\drvstore.dll:drvstore.dll (00007FFE554B0000), size: 1409024 (result: 0), SymType: '-deferred-', PDB: '', fileVersion: 10.0.22621.2506
|
||||
C:\WINDOWS\SYSTEM32\devobj.dll:devobj.dll (00007FFE5C330000), size: 180224 (result: 0), SymType: '-deferred-', PDB: '', fileVersion: 10.0.22621.2506
|
||||
C:\WINDOWS\SYSTEM32\wldp.dll:wldp.dll (00007FFE5BF30000), size: 307200 (result: 0), SymType: '-deferred-', PDB: '', fileVersion: 10.0.22621.2792
|
||||
C:\WINDOWS\System32\imagehlp.dll:imagehlp.dll (00007FFE5E8D0000), size: 126976 (result: 0), SymType: '-deferred-', PDB: '', fileVersion: 10.0.22621.1
|
||||
C:\WINDOWS\System32\DriverStore\FileRepository\nv_dispig.inf_amd64_7e5fd280efaa5445\nvwgf2umx.dll:nvwgf2umx.dll (00007FFE45CE0000), size: 99463168 (result: 0), SymType: '-deferred-', PDB: '', fileVersion: 31.0.15.3623
|
||||
C:\WINDOWS\system32\nvspcap64.dll:nvspcap64.dll (00007FFE29CA0000), size: 2953216 (result: 0), SymType: '-deferred-', PDB: '', fileVersion: 3.27.0.112
|
||||
C:\WINDOWS\SYSTEM32\ntmarta.dll:ntmarta.dll (00007FFE5B7B0000), size: 212992 (result: 0), SymType: '-deferred-', PDB: '', fileVersion: 10.0.22621.1
|
||||
C:\WINDOWS\System32\DriverStore\FileRepository\nv_dispig.inf_amd64_7e5fd280efaa5445\Display.NvContainer\MessageBus.dll:MessageBus.dll (00007FFE455A0000), size: 7565312 (result: 0), SymType: '-deferred-', PDB: '', fileVersion: 1.22.2758.1620
|
||||
C:\WINDOWS\system32\wbem\wbemprox.dll:wbemprox.dll (00007FFE553D0000), size: 65536 (result: 0), SymType: '-deferred-', PDB: '', fileVersion: 10.0.22621.2792
|
||||
C:\WINDOWS\SYSTEM32\wbemcomn.dll:wbemcomn.dll (00007FFE4C6F0000), size: 524288 (result: 0), SymType: '-deferred-', PDB: '', fileVersion: 10.0.22621.2506
|
||||
C:\WINDOWS\system32\wbem\wbemsvc.dll:wbemsvc.dll (00007FFE4BC00000), size: 81920 (result: 0), SymType: '-deferred-', PDB: '', fileVersion: 10.0.22621.2792
|
||||
C:\WINDOWS\system32\wbem\fastprox.dll:fastprox.dll (00007FFE4BE50000), size: 1015808 (result: 0), SymType: '-deferred-', PDB: '', fileVersion: 10.0.22621.2506
|
||||
C:\WINDOWS\SYSTEM32\amsi.dll:amsi.dll (00007FFE53020000), size: 118784 (result: 0), SymType: '-deferred-', PDB: '', fileVersion: 10.0.22621.1
|
||||
C:\WINDOWS\SYSTEM32\USERENV.dll:USERENV.dll (00007FFE5BD00000), size: 180224 (result: 0), SymType: '-deferred-', PDB: '', fileVersion: 10.0.22621.2506
|
||||
C:\ProgramData\Microsoft\Windows Defender\Platform\4.18.23110.3-0\MpOav.dll:MpOav.dll (00007FFE52D00000), size: 507904 (result: 0), SymType: '-deferred-', PDB: '', fileVersion: 4.18.23110.3
|
||||
D:\Unity\2021.3.33f1c1\Editor\cudart64_90.dll:cudart64_90.dll (00007FFDE7790000), size: 397312 (result: 0), SymType: '-deferred-', PDB: '', fileVersion: 6.14.11.9000
|
||||
C:\WINDOWS\SYSTEM32\opencl.dll:opencl.dll (00007FFDE7620000), size: 1490944 (result: 0), SymType: '-deferred-', PDB: '', fileVersion: 3.0.3.0
|
||||
D:\Unity\2021.3.33f1c1\Editor\radeonrays.dll:radeonrays.dll (00007FFDE7590000), size: 557056 (result: 0), SymType: '-deferred-', PDB: ''
|
||||
D:\Unity\2021.3.33f1c1\Editor\Data\MonoBleedingEdge\EmbedRuntime\mono-2.0-bdwgc.dll:mono-2.0-bdwgc.dll (00007FFDE6B30000), size: 10829824 (result: 0), SymType: '-deferred-', PDB: ''
|
||||
C:\WINDOWS\SYSTEM32\PROPSYS.dll:PROPSYS.dll (00007FFE57820000), size: 1052672 (result: 0), SymType: '-deferred-', PDB: '', fileVersion: 7.0.22621.2506
|
||||
C:\Windows\System32\Windows.FileExplorer.Common.dll:Windows.FileExplorer.Common.dll (00007FFE3E7C0000), size: 675840 (result: 0), SymType: '-deferred-', PDB: '', fileVersion: 10.0.22621.2506
|
||||
C:\WINDOWS\SYSTEM32\edputil.dll:edputil.dll (00007FFE3E3F0000), size: 163840 (result: 0), SymType: '-deferred-', PDB: '', fileVersion: 10.0.22621.1
|
||||
C:\Windows\System32\Windows.StateRepositoryPS.dll:Windows.StateRepositoryPS.dll (00007FFE3ED10000), size: 962560 (result: 0), SymType: '-deferred-', PDB: '', fileVersion: 10.0.22621.2792
|
||||
C:\WINDOWS\SYSTEM32\urlmon.dll:urlmon.dll (00007FFE4C250000), size: 2031616 (result: 0), SymType: '-deferred-', PDB: '', fileVersion: 11.0.22621.2792
|
||||
C:\WINDOWS\SYSTEM32\iertutil.dll:iertutil.dll (00007FFE41450000), size: 2867200 (result: 0), SymType: '-deferred-', PDB: '', fileVersion: 11.0.22621.3007
|
||||
C:\WINDOWS\SYSTEM32\netutils.dll:netutils.dll (00007FFE5B180000), size: 49152 (result: 0), SymType: '-deferred-', PDB: '', fileVersion: 10.0.22621.2506
|
||||
C:\WINDOWS\SYSTEM32\srvcli.dll:srvcli.dll (00007FFE4F5E0000), size: 163840 (result: 0), SymType: '-deferred-', PDB: '', fileVersion: 10.0.22621.2506
|
||||
C:\Windows\System32\cldapi.dll:cldapi.dll (00007FFE3E460000), size: 184320 (result: 0), SymType: '-deferred-', PDB: '', fileVersion: 10.0.22621.2506
|
||||
C:\WINDOWS\SYSTEM32\virtdisk.dll:virtdisk.dll (00007FFE336C0000), size: 86016 (result: 0), SymType: '-deferred-', PDB: '', fileVersion: 10.0.22621.2506
|
||||
C:\Windows\System32\appresolver.dll:appresolver.dll (00007FFE3D690000), size: 643072 (result: 0), SymType: '-deferred-', PDB: '', fileVersion: 10.0.22621.2792
|
||||
C:\Windows\System32\Bcp47Langs.dll:Bcp47Langs.dll (00007FFE4E690000), size: 393216 (result: 0), SymType: '-deferred-', PDB: '', fileVersion: 10.0.22621.2506
|
||||
C:\Windows\System32\OneCoreUAPCommonProxyStub.dll:OneCoreUAPCommonProxyStub.dll (00007FFE53890000), size: 6443008 (result: 0), SymType: '-deferred-', PDB: '', fileVersion: 10.0.22621.2792
|
||||
C:\WINDOWS\WinSxS\amd64_microsoft.windows.common-controls_6595b64144ccf1df_6.0.22621.2506_none_270c5ae97388e100\comctl32.dll:comctl32.dll (00007FFE50E90000), size: 2699264 (result: 0), SymType: '-deferred-', PDB: '', fileVersion: 6.10.22621.2506
|
||||
C:\Windows\System32\thumbcache.dll:thumbcache.dll (00007FFE3AF80000), size: 438272 (result: 0), SymType: '-deferred-', PDB: '', fileVersion: 10.0.22621.2506
|
||||
C:\Windows\System32\Windows.System.Launcher.dll:Windows.System.Launcher.dll (00007FFE55730000), size: 1265664 (result: 0), SymType: '-deferred-', PDB: '', fileVersion: 10.0.22621.2506
|
||||
C:\Windows\System32\msvcp110_win.dll:msvcp110_win.dll (00007FFE57DF0000), size: 602112 (result: 0), SymType: '-deferred-', PDB: '', fileVersion: 10.0.22621.1
|
||||
C:\WINDOWS\SYSTEM32\windows.staterepositorycore.dll:windows.staterepositorycore.dll (00007FFE55690000), size: 106496 (result: 0), SymType: '-deferred-', PDB: '', fileVersion: 10.0.22621.2792
|
||||
C:\WINDOWS\SYSTEM32\dbghelp.dll:dbghelp.dll (00007FFE512F0000), size: 2306048 (result: 0), SymType: '-deferred-', PDB: '', fileVersion: 10.0.22621.2506
|
||||
|
||||
========== OUTPUTTING STACK TRACE ==================
|
||||
|
||||
0x00007FFE5C6D567C (KERNELBASE) RaiseException
|
||||
0x00007FF7C03E178B (Unity) EditorMonoConsole::LogToConsoleImplementation
|
||||
0x00007FF7C03E227D (Unity) EditorMonoConsole::LogToConsoleImplementation
|
||||
0x00007FF7C1073027 (Unity) DebugStringToFilePostprocessedStacktrace
|
||||
0x00007FF7C107277D (Unity) DebugStringToFile
|
||||
0x00007FF7C08601B5 (Unity) LoadDomainAndUserAssemblies
|
||||
0x00007FF7C0860844 (Unity) LoadUserAssemblies
|
||||
0x00007FF7C0D5CDE1 (Unity) <lambda_f8411f227bdd47da33e064bfa1662688>::operator()
|
||||
0x00007FF7C0D9DDB2 (Unity) asio::detail::completion_handler<core::mutable_function<void __cdecl(void)>,asio::io_context::basic_executor_type<std::allocator<void>,0> >::do_complete
|
||||
0x00007FF7C0D89C9E (Unity) asio::detail::win_iocp_io_context::do_one
|
||||
0x00007FF7C0D8B904 (Unity) asio::detail::win_iocp_io_context::run
|
||||
0x00007FF7C0D9C19E (Unity) IOService::Run
|
||||
0x00007FF7C0D6E8BF (Unity) AssetImportWorkerClient::Run
|
||||
0x00007FF7C0D35C53 (Unity) RunAssetImportWorkerClientV2
|
||||
0x00007FF7C0D35CDB (Unity) RunAssetImporterV2
|
||||
0x00007FF7C0561F28 (Unity) Application::InitializeProject
|
||||
0x00007FF7C09B1798 (Unity) WinMain
|
||||
0x00007FF7C1DB05EE (Unity) __scrt_common_main_seh
|
||||
0x00007FFE5E4D257D (KERNEL32) BaseThreadInitThunk
|
||||
0x00007FFE5F38AA58 (ntdll) RtlUserThreadStart
|
||||
|
||||
========== END OF STACKTRACE ===========
|
||||
|
||||
A crash has been intercepted by the crash handler. For call stack and other details, see the latest crash report generated in:
|
||||
* C:/Users/ADMINI~1/AppData/Local/Temp/Unity/Editor/Crashes
|
||||
|
3274
JNFrame/Logs/AssetImportWorker3.log
Normal file
3274
JNFrame/Logs/AssetImportWorker3.log
Normal file
File diff suppressed because it is too large
Load Diff
2789
JNFrame/Logs/AssetImportWorker4.log
Normal file
2789
JNFrame/Logs/AssetImportWorker4.log
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,6 +1,3 @@
|
||||
Base path: 'D:/Unity/2021.3.33f1c1/Editor/Data', plugins path 'D:/Unity/2021.3.33f1c1/Editor/Data/PlaybackEngines'
|
||||
Cmd: initializeCompiler
|
||||
|
||||
Unhandled exception: Protocol error - failed to read magic number (error -2147483644, transferred 0/4)
|
||||
|
||||
Quitting shader compiler process
|
||||
|
@ -29,4 +29,7 @@ EditorBuildSettings:
|
||||
- enabled: 1
|
||||
path: Assets/Game/Scenes/Mode/Example11_RVO/GRVO01World.unity
|
||||
guid: 6601635721611064e92978155e3f0134
|
||||
- enabled: 1
|
||||
path: Assets/Game/Scenes/Mode/Example11_RVO/GRVO02World.unity
|
||||
guid: 20b9deb2a5e66a14bbd648adf2b7b9b2
|
||||
m_configObjects: {}
|
||||
|
@ -21,32 +21,32 @@ EditorUserSettings:
|
||||
value: 184c
|
||||
flags: 0
|
||||
RecentlyUsedSceneGuid-0:
|
||||
value: 5409020704005a585b5a5b7545710a44434e1b782a707168297a1e67b1e1656b
|
||||
flags: 0
|
||||
RecentlyUsedSceneGuid-1:
|
||||
value: 5a03005f0301085d0f5d082043200b444e4e1c7b2d7a7f352c714532b0e6653b
|
||||
flags: 0
|
||||
RecentlyUsedSceneGuid-2:
|
||||
value: 0650065500505e595c5b0824467b06444f16482b2e7f23652f7d4465b3e26c3b
|
||||
flags: 0
|
||||
RecentlyUsedSceneGuid-3:
|
||||
RecentlyUsedSceneGuid-1:
|
||||
value: 5304525206500f02085f5a7a41775916454e4872787d71347e7e1e37e1e2676b
|
||||
flags: 0
|
||||
RecentlyUsedSceneGuid-4:
|
||||
RecentlyUsedSceneGuid-2:
|
||||
value: 0606035f56565b5a5e5f557b41275a4414164c2e7c7b20637b2d1e63b4b3626e
|
||||
flags: 0
|
||||
RecentlyUsedSceneGuid-5:
|
||||
RecentlyUsedSceneGuid-3:
|
||||
value: 505556565d020c0b5b5e5b71157b0c44104e417e74707f617a2a1831b7e5636c
|
||||
flags: 0
|
||||
RecentlyUsedSceneGuid-6:
|
||||
RecentlyUsedSceneGuid-4:
|
||||
value: 5b54045556050808545759274125094414161e78797b27607f7f4d61b3e66461
|
||||
flags: 0
|
||||
RecentlyUsedSceneGuid-7:
|
||||
RecentlyUsedSceneGuid-5:
|
||||
value: 05010d5e06540d0d5d0d5c7141755e44134f19797a7e72642c7d456ab7b3323a
|
||||
flags: 0
|
||||
RecentlyUsedSceneGuid-8:
|
||||
RecentlyUsedSceneGuid-6:
|
||||
value: 020606025404595e5c580e7015770912434f1c28792d2532747e4c64e4b3633e
|
||||
flags: 0
|
||||
RecentlyUsedSceneGuid-7:
|
||||
value: 5507045753065c0c5f5f5a7341730944134e4a737b707765782c4e35b2b1676c
|
||||
flags: 0
|
||||
RecentlyUsedSceneGuid-8:
|
||||
value: 5101565f01500b090c5b097446220e4414151c7c787027342b7b1f64e0b9366a
|
||||
flags: 0
|
||||
RecentlyUsedSceneGuid-9:
|
||||
value: 5a5757560101590a5d0c0e24427b5d44434e4c7a7b7a23677f2b4565b7b5353a
|
||||
flags: 0
|
||||
|
Loading…
x
Reference in New Issue
Block a user