Skip to content

Commit

Permalink
Expose drift detection threshold, update readme and docs
Browse files Browse the repository at this point in the history
  • Loading branch information
JLChnToZ committed Apr 26, 2024
1 parent c720a66 commit 62d68dc
Show file tree
Hide file tree
Showing 4 changed files with 247 additions and 149 deletions.
3 changes: 3 additions & 0 deletions Packages/idv.jlchntoz.vvmw/Editor/VVMW/CoreEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ public class CoreEditor : VVMWEditorBase {
SerializedProperty screenTargetDefaultTexturesProperty;
SerializedProperty avProPropertyNamesProperty;
SerializedProperty realtimeGIUpdateIntervalProperty;
SerializedProperty timeDriftDetectThresholdProperty;
SerializedReorderableList playerHandlersList, audioSourcesList, targetsList;
string[] playerNames;
bool[] playerTypes;
Expand Down Expand Up @@ -84,6 +85,7 @@ protected override void OnEnable() {
avProPropertyNamesProperty = serializedObject.FindProperty("avProPropertyNames");
defaultTextureProperty = serializedObject.FindProperty("defaultTexture");
realtimeGIUpdateIntervalProperty = serializedObject.FindProperty("realtimeGIUpdateInterval");
timeDriftDetectThresholdProperty = serializedObject.FindProperty("timeDriftDetectThreshold");
targetsList = new SerializedReorderableList(serializedObject.FindProperty("targets"));
screenTargetVisibilityState = new List<bool>();
for (int i = 0, count = screenTargetsProperty.arraySize; i < count; i++)
Expand All @@ -99,6 +101,7 @@ public override void OnInspectorGUI() {
DrawAutoPlayField();
EditorGUILayout.PropertyField(totalRetryCountProperty);
EditorGUILayout.PropertyField(retryDelayProperty);
EditorGUILayout.PropertyField(timeDriftDetectThresholdProperty);
EditorGUILayout.Space();
playerHandlersList.DoLayoutList();
EditorGUILayout.Space();
Expand Down
15 changes: 11 additions & 4 deletions Packages/idv.jlchntoz.vvmw/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -178,10 +178,15 @@ This is the "brain" of the system, it controls and synchronizes the player (if e
- **Default Quest URL**: The optional alternative URL will be played for Quest/Android clients. Leave empty to use default URL.
- **Auto Play Player Type**: The "module" to use to play the above URL.
- **Loop**: Is default the player loops (can be toggled via UI)
- **Auto Play Delay Time**: The delay to start playing the default video when the scene is loaded.
This is to prevent rate limit between video players in same instance.
If you have multiple video players (not limited to VizVid) which will auto plays in the same world
you should set this to a value at least in multiple of `5` to stagger the loading time.
- **Auto Play Delay Time**: The delay to start playing the default video when the scene is loaded.
This is to prevent rate limit between video players in same instance.
If you have multiple video players (not limited to VizVid) which will auto plays in the same world
you should set this to a value at least in multiple of `5` to stagger the loading time.
- **Total Retry Count**: How many times should retry when video failed to load.
- **Retry Delay**: Delay to retry when video failed to load.
- **Time Drift Detect Threshold**: The player will adjust the time to sync with the owner's time when the time drift is greater than this value.
Recommend keep this value not too low or too high, as it may cause the video to jump back and forth,
or timing between players may drift too far.
- **Player Handlers**: The "modules" of actual the player components.
You usually don't need to change this, unless you want to disable unused player systems. See "Builtin Module" and "AVPro Module" for the modules.
- **Default Texture**: The default texture displays when the player is not playing anything. You can change to any texture here, but if you want it to be simple, just leave it in default value.
Expand All @@ -198,6 +203,8 @@ This is the "brain" of the system, it controls and synchronizes the player (if e
- **Audio Link**: [Audio Link](https://github.com/llealloo/vrc-udon-audio-link) support. It will wire the audio to provided Audio Link instance when the player is playing.
- **Targets**: For integration to custom scripts, it will sends out events to any Udon (sharp) behaviours assignaed here.
I don't provide source-code level documentation so please read the source code if you want to integrate with your scripts.
- **Realtime GI Update Interval**: The interval to update realtime GI, set to 0 to disable realtime GI update.
This features requires setup the lignt probes and realtime GI in the scene and the screen renderers.

### Builtin Module / AVPro Module
These are the video player modules. The purpose of these game objects are interfaces from the undely video player components to the core.
Expand Down
Loading

0 comments on commit 62d68dc

Please sign in to comment.