コード例 #1
0
        public static NavMeshWorld GetDefaultWorld()
        {
            NavMeshWorld result;

            NavMeshWorld.GetDefaultWorld_Injected(out result);
            return(result);
        }
コード例 #2
0
        public void AddDependency(JobHandle job)
        {
            bool flag = !this.IsValid();

            if (flag)
            {
                throw new InvalidOperationException("The NavMesh world is invalid.");
            }
            NavMeshWorld.AddDependencyInternal(this.world, job);
        }
コード例 #3
0
        public NavMeshQuery(NavMeshWorld world, Allocator allocator, int pathNodePoolSize = 0)
        {
            if (!world.IsValid())
            {
                throw new ArgumentNullException("world", "Invalid world");
            }
            m_NavMeshQuery = Create(world, pathNodePoolSize);

            DisposeSentinel.Create(out m_Safety, out m_DisposeSentinel, 0, allocator);
            AddQuerySafety(m_NavMeshQuery, m_Safety);
        }
コード例 #4
0
        public NavMeshQuery(NavMeshWorld world, Allocator allocator, int pathNodePoolSize = 0)
        {
            bool flag = !world.IsValid();

            if (flag)
            {
                throw new ArgumentNullException("world", "Invalid world");
            }
            this.m_NavMeshQuery = NavMeshQuery.Create(world, pathNodePoolSize);
            DisposeSentinel.Create(out this.m_Safety, out this.m_DisposeSentinel, 0, allocator);
            NavMeshQuery.AddQuerySafety(this.m_NavMeshQuery, this.m_Safety);
        }
コード例 #5
0
        public NavMeshQuery(NavMeshWorld world, Allocator allocator, int pathNodePoolSize = 0)
        {
            if (!world.IsValid())
            {
                throw new ArgumentNullException("world", "Invalid world");
            }

            if (pathNodePoolSize < 0 || pathNodePoolSize > ushort.MaxValue)
            {
                throw new ArgumentException($"The path node pool size ({pathNodePoolSize}) must be greater than or equal to 0 and less than {ushort.MaxValue + 1}.");
            }
            m_NavMeshQuery = Create(world, pathNodePoolSize);

            DisposeSentinel.Create(out m_Safety, out m_DisposeSentinel, 0, allocator);
            AddQuerySafety(m_NavMeshQuery, m_Safety);
        }
コード例 #6
0
        public NavMeshQuery(NavMeshWorld world, Allocator allocator, int pathNodePoolSize = 0)
        {
            if (!world.IsValid())
            {
                throw new ArgumentNullException("world", "Invalid world");
            }

            if (pathNodePoolSize < 0 || pathNodePoolSize > ushort.MaxValue)
            {
                throw new ArgumentException($"The path node pool size ({pathNodePoolSize}) must be greater than or equal to 0 and less than {ushort.MaxValue + 1}.");
            }
            m_NavMeshQuery = Create(world, pathNodePoolSize);

            UnsafeUtility.LeakRecord(m_NavMeshQuery, LeakCategory.NavMeshQuery, 0);
            AtomicSafetyHandle.CreateHandle(out m_Safety, allocator);
            AddQuerySafety(m_NavMeshQuery, m_Safety);
        }
コード例 #7
0
 private static IntPtr Create(NavMeshWorld world, int nodePoolSize)
 {
     return(NavMeshQuery.Create_Injected(ref world, nodePoolSize));
 }
コード例 #8
0
 private static extern IntPtr Create_Injected(ref NavMeshWorld world, int nodePoolSize);
コード例 #9
0
 private static extern void GetDefaultWorld_Injected(out NavMeshWorld ret);
コード例 #10
0
 private static void AddDependencyInternal(IntPtr navmesh, JobHandle handle)
 {
     NavMeshWorld.AddDependencyInternal_Injected(navmesh, ref handle);
 }
コード例 #11
0
 static extern IntPtr Create(NavMeshWorld world, int nodePoolSize);
コード例 #12
0
 public NavMeshQuery(NavMeshWorld world, Allocator allocator, int pathNodePoolSize = 0)
 {
     m_Allocator    = allocator;
     m_NavMeshQuery = Create(world, pathNodePoolSize);
 }