Initial Commit

This commit is contained in:
Simeon Radivoev 2022-02-12 12:53:50 +02:00
commit ee5c2f922d
Signed by: simeonradivoev
GPG key ID: 7611A451D2A5D37A
2255 changed files with 547750 additions and 0 deletions

View file

@ -0,0 +1,33 @@
using DefaultNamespace;
using System;
using Unity.Entities;
using UnityEngine.ResourceManagement.AsyncOperations;
[assembly: RegisterGenericComponentType(typeof(AssetReferenceData<ItemPrefab>))]
namespace DefaultNamespace
{
public struct AssetReferenceData<T> : ISharedComponentData, IEquatable<AssetReferenceData<T>> where T : class
{
public AsyncOperationWrapper<T> Operation;
public AssetReferenceData(AsyncOperationHandle<T> operation)
{
Operation = new AsyncOperationWrapper<T>(operation);
}
public bool Equals(AssetReferenceData<T> other)
{
return Operation.Equals(other.Operation);
}
public override bool Equals(object obj)
{
return obj is AssetReferenceData<T> other && Equals(other);
}
public override int GetHashCode()
{
return Operation.GetHashCode();
}
}
}