Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -128,11 +128,22 @@ private void RenderGraph(IGraph graph, Object selectedObject)
nodeRoot.AddToClassList("node-root");
dragRoot.Add(nodeRoot);

nodeRoot.schedule.Execute(() => { nodeRoot.transform.scale = new Vector3(this.values.Zoom / 100f, this.values.Zoom / 100f, 1); }).Every(33);
nodeRoot.schedule.Execute(() =>
{
#if UNITY_6000_3_OR_NEWER
nodeRoot.style.scale = new Vector2(this.values.Zoom / 100f, this.values.Zoom / 100f);
#else
nodeRoot.transform.scale = new Vector3(this.values.Zoom / 100f, this.values.Zoom / 100f, 1);
#endif
}).Every(33);

this.values.DragDrawer = new DragDrawer(dragRoot, offset =>
{
#if UNITY_6000_3_OR_NEWER
nodeRoot.style.translate = offset;
#else
nodeRoot.transform.position = offset;
#endif

this.values.Update();

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
using CrashKonijn.Agent.Core;
using System;
using CrashKonijn.Agent.Core;

namespace CrashKonijn.Agent.Runtime
{
[Serializable]
public class EmptyActionProperties : IActionProperties
{
}
Expand Down
18 changes: 7 additions & 11 deletions Package/Runtime/CrashKonijn.Agent.Runtime/LoggerBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,14 @@ public bool ShouldLog()
{
#if UNITY_EDITOR
return this.config.DebugMode != DebugMode.None;
#else
return false;
#endif
}

return false;
public void Dispose()
{
this.UnregisterEvents();
}

private string FormatLog(string message, DebugSeverity severity)
Expand Down Expand Up @@ -161,14 +166,10 @@ private void AddToConsole(string message, DebugSeverity severity)
private void Store(string message)
{
if (this.config.MaxLogSize == 0)
{
return;
}

if (this.Logs.Count >= this.config.MaxLogSize)
{
this.Logs.RemoveAt(0);
}

this.Logs.Add(message);
}
Expand All @@ -180,11 +181,6 @@ private void Store(string message)
{
this.UnregisterEvents();
}

public void Dispose()
{
this.UnregisterEvents();
}
}
#endif
}
}