Created
September 9, 2018 12:05
-
-
Save johans2/58f595d9a56f8269984440c02c418882 to your computer and use it in GitHub Desktop.
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
using UnityEngine; | |
using UnityEngine.Assertions; | |
using Cakewalk.IoC; | |
public class ExampleBehaviour : MonoBehaviour { | |
[Dependency] IExampleClass exampleClass; | |
[Dependency] ExampleClass2 exampleClass2; | |
void Awake() { | |
this.InjectDependencies(); | |
} | |
void Start() { | |
Assert.IsNotNull(exampleClass); | |
Assert.IsNotNull((exampleClass as ExampleClass).testClass2); | |
Assert.IsNotNull(exampleClass2); | |
} | |
void Update() { | |
// Do stuff.. | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment