-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Put the whole package in a namespace
Everything is now inside of a SerializableCallbacks namespace
- Loading branch information
1 parent
7ff19f1
commit 9141a06
Showing
11 changed files
with
1,153 additions
and
842 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,17 @@ | ||
using UnityEngine; | ||
using System; | ||
|
||
/// <summary> Add to fields of your class extending SerializableCallbackBase<T,..> to limit which types can be assigned to it. </summary> | ||
public class TargetConstraintAttribute : PropertyAttribute { | ||
public Type targetType; | ||
|
||
namespace SerializableCallbacks | ||
{ | ||
/// <summary> Add to fields of your class extending SerializableCallbackBase<T,..> to limit which types can be assigned to it. </summary> | ||
public TargetConstraintAttribute(Type targetType) { | ||
this.targetType = targetType; | ||
public class TargetConstraintAttribute : PropertyAttribute | ||
{ | ||
public Type targetType; | ||
|
||
/// <summary> Add to fields of your class extending SerializableCallbackBase<T,..> to limit which types can be assigned to it. </summary> | ||
public TargetConstraintAttribute(Type targetType) | ||
{ | ||
this.targetType = targetType; | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
public abstract class InvokableCallbackBase<TReturn> { | ||
public abstract TReturn Invoke(params object[] args); | ||
namespace SerializableCallbacks | ||
{ | ||
public abstract class InvokableCallbackBase<TReturn> | ||
{ | ||
public abstract TReturn Invoke(params object[] args); | ||
} | ||
} |
Oops, something went wrong.