Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- internal static class CommonCacheTypeIdentifier {
- private static int counter;
- static CommonCacheTypeIdentifier() => counter = -1;
- internal static int GetID() => counter++;
- }
- internal static class CacheTypeIdentifier<T> where T : struct, IComponent {
- public static int typeID;
- static CacheTypeIdentifier() => typeID = CommonCacheTypeIdentifier.GetID();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement