[FIX] Fixed duck IDs and other small fixes
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using EasyButtons;
|
||||
using Unity.Collections;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UIElements;
|
||||
|
||||
@@ -9,7 +10,6 @@ using UnityEngine.UIElements;
|
||||
public class DuckStickerData: ScriptableObject
|
||||
{
|
||||
[SerializeField]
|
||||
[ReadOnly]
|
||||
private string _id = System.Guid.NewGuid().ToString();
|
||||
|
||||
[SerializeField]
|
||||
@@ -24,9 +24,12 @@ public class DuckStickerData: ScriptableObject
|
||||
|
||||
public Sprite StickerSprite => _stickerSprite;
|
||||
|
||||
#if UNITY_EDITOR
|
||||
[Button]
|
||||
public void RegenerateId()
|
||||
{
|
||||
_id = Guid.NewGuid().ToString();
|
||||
EditorUtility.SetDirty(this);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
Reference in New Issue
Block a user