Upload project files
This commit is contained in:
31
Runtime/Cloner/Models/ObjectIdInfo.cs
Normal file
31
Runtime/Cloner/Models/ObjectIdInfo.cs
Normal file
@@ -0,0 +1,31 @@
|
||||
using System;
|
||||
using Unity.Collections;
|
||||
|
||||
namespace Misaki.ArtTool
|
||||
{
|
||||
public struct ObjectIdInfo : IDisposable
|
||||
{
|
||||
public NativeArray<int> instanceIdArray;
|
||||
public NativeArray<int> transformIdArray;
|
||||
|
||||
public bool IsCreated
|
||||
{
|
||||
get
|
||||
{
|
||||
return instanceIdArray.IsCreated && transformIdArray.IsCreated;
|
||||
}
|
||||
}
|
||||
|
||||
public ObjectIdInfo(int size)
|
||||
{
|
||||
instanceIdArray = new(size, Allocator.Persistent);
|
||||
transformIdArray = new(size, Allocator.Persistent);
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
instanceIdArray.Dispose();
|
||||
transformIdArray.Dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user