HealthReworkFuckMojMozg
This commit is contained in:
1 parent
98e4a055fe
commit
72070901ec
8 files changed
+65
-27
No files matched your search
@@ -0,0 +1,24 @@
|
||||
using System;
|
||||
using Unity.Collections;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Code.Example.Platformer.Entity
|
||||
{
|
||||
public class EntityGUID : MonoBehaviour
|
||||
{
|
||||
[SerializeField, ReadOnly] private string _id = GenerateId();
|
||||
|
||||
public string Id => _id;
|
||||
|
||||
[ContextMenu("Reset Id")]
|
||||
private void ResetId()
|
||||
{
|
||||
_id = GenerateId();
|
||||
}
|
||||
|
||||
private static string GenerateId()
|
||||
{
|
||||
return Guid.NewGuid().ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user