You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(Examples): display error if script define symbols have not been set
There is an issue where the new example scenes don't set the required
VRTK script define symbols because this is done via the SDK Manager
script and that is no longer present in the example scenes as it is
dynamically loaded in via the constructor scene.
This fix simply throws an error if the example scene cannot find the
required scripting define symbols and attempts to provide useful
information for the user to rectify the issue.
VRTK_Logger.Error("No VRTK scripting define symbols have been found. "+VRTK_Logger.GetCommonMessage(VRTK_Logger.CommonMessageKeys.SCRIPTING_DEFINE_SYMBOLS_NOT_FOUND),true);
Copy file name to clipboardExpand all lines: Assets/VRTK/Examples/README.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,9 @@
1
1
# Examples
2
2
3
+
**Important Note**
4
+
5
+
> The example scenes no longer contain the `VRTK_SDKManager` as this is loaded in at runtime via the `VRTK_SDKManager_Constructor` scene. As the `VRTK_SDKManager` script is responsible for setting up the required Unity Scripting Define Symbols for installed SDKs it is required that the `VRTK_SDKManager_Constructor` scene is opened in the Unity Editor when first using the project or when installing a new supported SDK so it can set up the scripting define symbols. The example scenes will not work until the scripting define symbols have been set up correctly so please ensure that the `VRTK_SDKManager_Constructor` scene is loaded into the Unity Editor first.
6
+
3
7
This directory contains Unity3d scenes that demonstrate the scripts and prefabs being used in the game world to create desired functionality.
4
8
5
9
> *VRTK offers a VR Simulator that works without any third party SDK, but VR device support requires a supported VR SDK to be imported into the Unity project.*
Copy file name to clipboardExpand all lines: Assets/VRTK/Source/Scripts/Internal/VRTK_Logger.cs
+16-9Lines changed: 16 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -34,7 +34,8 @@ public enum CommonMessageKeys
34
34
SDK_NOT_FOUND,
35
35
SDK_MANAGER_ERRORS,
36
36
SCRIPTING_DEFINE_SYMBOLS_ADDED,
37
-
SCRIPTING_DEFINE_SYMBOLS_REMOVED
37
+
SCRIPTING_DEFINE_SYMBOLS_REMOVED,
38
+
SCRIPTING_DEFINE_SYMBOLS_NOT_FOUND
38
39
}
39
40
40
41
publicstaticVRTK_Loggerinstance=null;
@@ -51,7 +52,8 @@ public enum CommonMessageKeys
51
52
{CommonMessageKeys.SDK_NOT_FOUND,"The SDK '{0}' doesn't exist anymore. The fallback SDK '{1}' will be used instead."},
52
53
{CommonMessageKeys.SDK_MANAGER_ERRORS,"The current SDK Manager setup is causing the following errors:\n\n{0}"},
53
54
{CommonMessageKeys.SCRIPTING_DEFINE_SYMBOLS_ADDED,"Scripting Define Symbols added to [Project Settings->Player] for {0}: {1}"},
54
-
{CommonMessageKeys.SCRIPTING_DEFINE_SYMBOLS_REMOVED,"Scripting Define Symbols removed from [Project Settings->Player] for {0}: {1}"}
55
+
{CommonMessageKeys.SCRIPTING_DEFINE_SYMBOLS_REMOVED,"Scripting Define Symbols removed from [Project Settings->Player] for {0}: {1}"},
56
+
{CommonMessageKeys.SCRIPTING_DEFINE_SYMBOLS_NOT_FOUND,"If you are attempting to run an example scene and have not opened the `VRTK/Examples/VRTK_SDKManager_Constructor` scene in the Unity Editor then this is most likely why you are receiving this error message, try opening the `VRTK/Examples/VRTK_SDKManager_Constructor` scene and letting it configure the relevant scripting define symbols and then re-open the desired example scene and try again."}
returndescription+" Its needed scripting define symbols are not added. You can click the GameObject with the `VRTK_SDKManager` script attached to it in Edit Mode and choose to automatically let the manager handle the scripting define symbols.";
496
+
returndescription+" Its needed scripting define symbols are not added. You can click the GameObject with the `VRTK_SDKManager` script attached to it in Edit Mode and choose to automatically let the manager handle the scripting define symbols."+VRTK_Logger.GetCommonMessage(VRTK_Logger.CommonMessageKeys.SCRIPTING_DEFINE_SYMBOLS_NOT_FOUND);
497
497
}
498
498
499
499
returndescription+" The needed vendor SDK isn't installed.";
Copy file name to clipboardExpand all lines: README.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -45,6 +45,10 @@ see if your query has already been answered.
45
45
* Open the folder in Unity to load the project.
46
46
* Have a look at the included example scenes.
47
47
48
+
**Important Note**
49
+
50
+
> The example scenes no longer contain the `VRTK_SDKManager` as this is loaded in at runtime via the `VRTK_SDKManager_Constructor` scene. As the `VRTK_SDKManager` script is responsible for setting up the required Unity Scripting Define Symbols for installed SDKs it is required that the `VRTK_SDKManager_Constructor` scene is opened in the Unity Editor when first using the project or when installing a new supported SDK so it can set up the scripting define symbols. The example scenes will not work until the scripting define symbols have been set up correctly so please ensure that the `VRTK_SDKManager_Constructor` scene is loaded into the Unity Editor first.
51
+
48
52
The example scenes support all the VRTK supported VR SDKs. To make use
49
53
of VR devices (besides the included VR Simulator) import the needed
0 commit comments