Skip to content

Commit

Permalink
added DebugWrapper, bumped version to 1.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jheiling committed Feb 19, 2018
1 parent a5f9ef7 commit 97ab9d8
Show file tree
Hide file tree
Showing 7 changed files with 269 additions and 5 deletions.
185 changes: 185 additions & 0 deletions Code/Utils/Engine/DebugWrapper.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,185 @@
using UnityEngine;



namespace Signals.Utils.Engine
{
[CreateAssetMenu(fileName = "Debug", menuName = "Signals/Utils/Engine/DebugWrapper")]
public class DebugWrapper : ScriptableObject
{
public void Assert(bool condition)
{
Debug.Assert(condition);
}

public void Break()
{
Debug.Break();
}

public void Log(string message)
{
Debug.Log(message);
}

public void LogWarning(string message)
{
Debug.LogWarning(message);
}

public void LogError(string message)
{
Debug.LogError(message);
}

public void Log(bool message)
{
Debug.Log(message);
}

public void LogWarning(bool message)
{
Debug.LogWarning(message);
}

public void LogError(bool message)
{
Debug.LogError(message);
}

public void Log(char message)
{
Debug.Log(message);
}

public void LogWarning(char message)
{
Debug.LogWarning(message);
}

public void LogError(char message)
{
Debug.LogError(message);
}

public void Log(float message)
{
Debug.Log(message);
}

public void LogWarning(float message)
{
Debug.LogWarning(message);
}

public void LogError(float message)
{
Debug.LogError(message);
}

public void Log(int message)
{
Debug.Log(message);
}

public void LogWarning(int message)
{
Debug.LogWarning(message);
}

public void LogError(int message)
{
Debug.LogError(message);
}

public void Log(Quaternion message)
{
Debug.Log(message);
}

public void LogWarning(Quaternion message)
{
Debug.LogWarning(message);
}

public void LogError(Quaternion message)
{
Debug.LogError(message);
}

public void Log(Vector2 message)
{
Debug.Log(message);
}

public void LogWarning(Vector2 message)
{
Debug.LogWarning(message);
}

public void LogError(Vector2 message)
{
Debug.LogError(message);
}

public void Log(Vector2Int message)
{
Debug.Log(message);
}

public void LogWarning(Vector2Int message)
{
Debug.LogWarning(message);
}

public void LogError(Vector2Int message)
{
Debug.LogError(message);
}

public void Log(Vector3 message)
{
Debug.Log(message);
}

public void LogWarning(Vector3 message)
{
Debug.LogWarning(message);
}

public void LogError(Vector3 message)
{
Debug.LogError(message);
}

public void Log(Vector3Int message)
{
Debug.Log(message);
}

public void LogWarning(Vector3Int message)
{
Debug.LogWarning(message);
}

public void LogError(Vector3Int message)
{
Debug.LogError(message);
}

public void Log(Vector4 message)
{
Debug.Log(message);
}

public void LogWarning(Vector4 message)
{
Debug.LogWarning(message);
}

public void LogError(Vector4 message)
{
Debug.LogError(message);
}
}
}
13 changes: 13 additions & 0 deletions Code/Utils/Engine/DebugWrapper.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 23 additions & 1 deletion Examples/Example1/Signals/GravityY.asset
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,29 @@ MonoBehaviour:
_initialValue: 0
_onChanged:
m_PersistentCalls:
m_Calls: []
m_Calls:
- m_Target: {fileID: 11400000, guid: 339cb66c787a6fd459ba8306c85481a6, type: 2}
m_MethodName: Log
m_Mode: 5
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
m_IntArgument: 0
m_FloatArgument: 0
m_StringArgument: 'Gravity:'
m_BoolArgument: 0
m_CallState: 2
- m_Target: {fileID: 11400000, guid: 339cb66c787a6fd459ba8306c85481a6, type: 2}
m_MethodName: Log
m_Mode: 0
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
m_IntArgument: 0
m_FloatArgument: 0
m_StringArgument:
m_BoolArgument: 0
m_CallState: 2
m_TypeName: Signals.Common.FloatEvent, Signals, Version=0.0.0.0, Culture=neutral,
PublicKeyToken=null
_useValidation: 1
24 changes: 23 additions & 1 deletion Examples/Example1/Signals/TimeScale.asset
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,29 @@ MonoBehaviour:
_initialValue: 0
_onChanged:
m_PersistentCalls:
m_Calls: []
m_Calls:
- m_Target: {fileID: 11400000, guid: 339cb66c787a6fd459ba8306c85481a6, type: 2}
m_MethodName: Log
m_Mode: 5
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
m_IntArgument: 0
m_FloatArgument: 0
m_StringArgument: 'TimeScale:'
m_BoolArgument: 0
m_CallState: 2
- m_Target: {fileID: 11400000, guid: 339cb66c787a6fd459ba8306c85481a6, type: 2}
m_MethodName: Log
m_Mode: 0
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
m_IntArgument: 0
m_FloatArgument: 0
m_StringArgument:
m_BoolArgument: 0
m_CallState: 2
m_TypeName: Signals.Common.FloatEvent, Signals, Version=0.0.0.0, Culture=neutral,
PublicKeyToken=null
_useValidation: 1
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Signals For Unity3D v1.1.0
# Signals For Unity3D v1.2.0
## Documentation
You can find the API documentation [here](https://jheiling.github.io/unity-signals/).
## What Are Signals?
Expand Down Expand Up @@ -67,5 +67,4 @@ You can find a simple code generator that can save you a lot of work [here](http
### Examples
See Examples folder.
## Credits
Signals was inspired by Ryan Hipple's [talk](https://www.youtube.com/watch?v=raQ3iHhE_Kk) about game architecture with ScriptableObjects.
I also nicked a bit of his code for the ValueReferenceDrawer class. You can find the source [here](https://github.com/roboryantron/Unite2017).
Signals was inspired by Ryan Hipple's [talk](https://www.youtube.com/watch?v=raQ3iHhE_Kk) about game architecture with ScriptableObjects.
13 changes: 13 additions & 0 deletions Wrapper/Debug.asset
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 3d7229d17e1eee44ba6021a1756490a9, type: 3}
m_Name: Debug
m_EditorClassIdentifier:
10 changes: 10 additions & 0 deletions Wrapper/Debug.asset.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 97ab9d8

Please sign in to comment.