Skip to content
Snippets Groups Projects
Commit f214b0ea authored by Johannes Büttner's avatar Johannes Büttner
Browse files

Added OnConfigureLogic

parent a04107cf
No related branches found
No related tags found
No related merge requests found
......@@ -23,6 +23,13 @@ public virtual void SetupScene(){}
/// </summary>
public virtual void OnConfigureScene(){}
/// <summary>
/// Called once for every scene in the Unity project. At the time of
/// execution the scene is loaded. Use this method to add functionality of the logic engine
/// after all scenes are configured. All changes to the scene are saved after execution.
/// </summary>
public virtual void OnConfigureLogic(){}
/// <summary>
/// Called once when all previous configuration methods have been called.
/// </summary>
......
......@@ -9,6 +9,7 @@ public static void ExecuteAll() {
Init();
SetupScene();
OnConfigureScene();
OnConfigureLogic();
OnPostConfiguration();
}
......@@ -18,6 +19,8 @@ public static void ExecuteAll() {
public static void OnConfigureScene() => CallMethodsPerScene(nameof(PackageConfigurator.OnConfigureScene));
public static void OnConfigureLogic() => CallMethodsPerScene(nameof(PackageConfigurator.OnConfigureLogic));
public static void OnPostConfiguration() => CallMethods(nameof(PackageConfigurator.OnPostConfiguration));
private static void CallMethodsPerScene(string methodName) {
......
......@@ -6,8 +6,10 @@ This package provides a coherent interface for all VIA-VR Unity packages to use.
```mermaid
graph TD;
Init-->OnConfigureScene;
OnConfigureScene-->OnPostConfiguration;
Init-->SetupScene;
SetupScene-->OnConfigureScene;
OnConfigureScene-->OnConfigureLogic;
OnConfigureLogic-->OnPostConfiguration;
```
See [PackageConfigurator.cs](https://gitlab2.informatik.uni-wuerzburg.de/GE/Dev/ViaVR/components/via-vr-unity-bridge/-/blob/main/Packages/de.jmu.ge.viavr.unitybridge/Editor/Core/PackageConfigurator.cs) to learn when these event methods are called.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment