Skip to content

Commit

Permalink
update unity components (#28)
Browse files Browse the repository at this point in the history
  • Loading branch information
vu-luong authored Jun 6, 2023
1 parent c3ee36d commit c5b1f3e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
6 changes: 3 additions & 3 deletions unity/EzyDefaultController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ public class EzyDefaultController : MonoBehaviour
protected static readonly EzyLogger LOGGER = EzyUnityLoggerFactory
.getLogger<EzyDefaultController>();

protected void Start()
protected void OnEnable()
{
LOGGER.debug("Start");
LOGGER.debug("OnEnable");
var socketProxyManager = EzySocketProxyManager.getInstance();
if (!socketProxyManager.hasInited())
{
Expand Down Expand Up @@ -51,7 +51,7 @@ protected void Start()
);
}

protected void on<T>(String cmd, EzyAppProxyDataHandler<T> handler)
protected void AddHandler<T>(String cmd, EzyAppProxyDataHandler<T> handler)
{
handlers.Add(
new Tuple<String, Object>(cmd, appProxy.on(cmd, handler))
Expand Down
13 changes: 10 additions & 3 deletions unity/variable/EzyScriptableVariable.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,19 @@ public class EzyScriptableVariable<T> : ScriptableObject
{
#if UNITY_EDITOR && !UNITY_WEBGL
[Multiline]
public string DeveloperDescription = "";
[field: SerializeField]
private string developerDescription = "";
#endif

[field: SerializeField] public T Value { get; set; }
[field: SerializeField]
public T Value { get; set; }

public void setValue(EzyScriptableVariable<T> variable)
private void OnEnable()
{
hideFlags = HideFlags.DontUnloadUnusedAsset;
}

public void SetValue(EzyScriptableVariable<T> variable)
{
Value = variable.Value;
}
Expand Down

0 comments on commit c5b1f3e

Please sign in to comment.