Skip to content

Colorfix#117

Merged
dyfios merged 23 commits into
3.0.1from
colorfix
Jun 1, 2026
Merged

Colorfix#117
dyfios merged 23 commits into
3.0.1from
colorfix

Conversation

@dyfios
Copy link
Copy Markdown
Contributor

@dyfios dyfios commented Jun 1, 2026

No description provided.

Copilot AI review requested due to automatic review settings June 1, 2026 22:15
@dyfios dyfios merged commit 440942f into 3.0.1 Jun 1, 2026
1 check failed
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR combines a set of VR “color/brightness” and stability fixes with broader runtime improvements: it adjusts VR rendering behavior, hardens entity placement preview raycasts by disabling preview colliders, improves CharacterEntity grounding/gravity integration (with new regression tests), and extends world loading APIs to support an injected “require” script plus a dry-run VEML validation flow.

Changes:

  • Update CharacterEntity grounding/gravity integration (use CharacterController.isGrounded, remove FixedUpdate throttling, split vertical velocity from horizontal displacement) and add new PlayMode tests to gate regressions.
  • Disable colliders on “placing” entities and remove colliders/rigidbodies from preview objects so placement raycasts hit world geometry reliably; plumb a configurable previewMaterial.
  • Add currentURL tracking improvements, a LoadWorld(..., requireScript) option, and TestLoadWorld / TestVEMLDocument dry-run validation exposed through the JS World API.

Reviewed changes

Copilot reviewed 15 out of 18 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
Packages/packages-lock.json Adds an embedded Socket.IO package entry to Unity’s package lock.
Assets/XR/Settings/OpenXR Package Settings.asset Updates OpenXR serialized settings/feature lists (Unity-generated asset changes).
Assets/Runtime/TopLevel/Scripts/DesktopMode.cs Disables HDR on the VR camera when entering VR.
Assets/Runtime/TopLevel/Scenes/MobileRuntime.unity Wires new serialized runtime fields (e.g., previewMaterial, cleanup interval) and adds Tab UI prefab/component references.
Assets/Runtime/StraightFour/Testing/EntityTests/CharacterEntityGroundingTests.cs.meta New Unity meta for grounding tests.
Assets/Runtime/StraightFour/Testing/EntityTests/CharacterEntityGroundingTests.cs New PlayMode tests covering grounding/oscillation/free-fall hypotheses.
Assets/Runtime/StraightFour/Environment/Materials/Skybox.mat Adjusts skybox tint values.
Assets/Runtime/StraightFour/Entity/Water/Scripts/WaterBodyEntity.cs Disables placement colliders + strips colliders/rigidbodies from preview hierarchy.
Assets/Runtime/StraightFour/Entity/Water/Scripts/WaterBlockerEntity.cs Same placement/preview collider stripping changes as WaterBody.
Assets/Runtime/StraightFour/Entity/Mesh/Scripts/MeshEntity.cs Disables placement colliders, strips preview colliders/rigidbodies, and stops animations on init.
Assets/Runtime/StraightFour/Entity/Character/Scripts/CharacterEntity.cs Grounding/gravity refactor, adds externalPositionControl, updates surface detection.
Assets/Runtime/StraightFour/Entity/Character/Materials/SimpleAvatarTorso.mat Adds _AddPrecomputedVelocity and minor color serialization change.
Assets/Runtime/StraightFour/Entity/Character/Materials/SimpleAvatarHead.mat Adds _AddPrecomputedVelocity and minor color serialization change.
Assets/Runtime/StraightFour/Entity/Base/Scripts/BaseEntity.cs Tracks played animations and adds StopAllAnimations().
Assets/Runtime/StraightFour/Entity/Automobile/Scripts/AutomobileEntity.cs Disables placement colliders + strips preview colliders/rigidbodies.
Assets/Runtime/StraightFour/Entity/Airplane/Tests.meta Removes stray meta file.
Assets/Runtime/StraightFour/Entity/Airplane/Scripts/AirplaneEntity.cs Disables placement colliders + strips preview colliders/rigidbodies.
Assets/Runtime/Runtime/Scripts/WebVerseRuntime.cs Adds previewMaterial, LoadWorld(..., requireScript), TestLoadWorld, and updates currentURL assignment.
Assets/Runtime/Handlers/VEMLHandler/Scripts/VEMLHandler.cs Adds VEML dry-run testing, asset URI collection/HEAD checks, and require-script injection into script processing.
Assets/Runtime/Handlers/JavascriptHandler/Tests/WorldAPITests.cs.meta New Unity meta for JS API tests.
Assets/Runtime/Handlers/JavascriptHandler/Tests/WorldAPITests.cs New tests for currentURL, LoadWorld overloads, and TestLoadWorld behavior.
Assets/Runtime/Handlers/JavascriptHandler/APIs/WorldBrowserUtilities/Scripts/World.cs Exposes GetWorldURL, adds LoadWorld(url, requireScript) and TestLoadWorld to JS API.
Assets/Runtime/Handlers/JavascriptHandler/APIs/Input/Scripts/Input.cs Toggles CharacterEntity.externalPositionControl when adding/removing rig followers.
.gitignore Ignores .worldkit/.
Files not reviewed (2)
  • Assets/Runtime/Handlers/JavascriptHandler/Tests/WorldAPITests.cs.meta: Language not supported
  • Assets/Runtime/StraightFour/Testing/EntityTests/CharacterEntityGroundingTests.cs.meta: Language not supported
Comments suppressed due to low confidence (2)

Assets/Runtime/Runtime/Scripts/WebVerseRuntime.cs:831

  • TestLoadWorld invokes onTestComplete without first checking for null. Since this is a public API, passing a null callback will currently throw a NullReferenceException (including in the vemlHandler==null early-return path). Add a guard at the start of the method.
                        state = RuntimeState.Error;
                        Handlers.Javascript.APIs.Utilities.World.Emit(Events.World.Error,
                            Jint.Native.JsValue.FromObject(
                                WebVerseRuntime.Instance.javascriptHandler.Engine,
                                new { message = "World loading failed (VEML)" }));
                    }

Assets/Runtime/StraightFour/Entity/Character/Scripts/CharacterEntity.cs:336

  • Move() currently both (1) applies the displacement immediately via characterController.Move(amount) and (2) accumulates amount.x/z into currentVelocity, which FixedUpdate later applies again. Since FixedUpdate uses currentVelocity.x/z as displacement, this causes horizontal motion to be applied twice whenever Move() is called (e.g., DesktopRig calls Move() every Update). Either queue movement for FixedUpdate OR apply it immediately, but not both.
        }

        /// <summary>
        /// Set the character label offset at runtime.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +61 to +67
private static void SetCurrentURL(WebVerseRuntime runtime, string url)
{
PropertyInfo prop = typeof(WebVerseRuntime).GetProperty(
"currentURL", BindingFlags.Public | BindingFlags.Instance);
Assert.NotNull(prop, "currentURL property must exist on WebVerseRuntime.");
prop.SetValue(runtime, url);
}
Comment on lines 139 to +143

/// <summary>
/// Vertical velocity in meters/second. Integrated by gravity each FixedUpdate; displacement
/// is verticalVelocity * Time.deltaTime applied via CharacterController.Move. Jump() and the
/// y component of Move(amount) treat this as velocity (m/s), not per-frame displacement.
Comment on lines 2269 to +2272
stateSettings: {fileID: 11400000, guid: 3404c49a4170ad94e87f0e8545b86758, type: 2}
airplaneEntityPrefab: {fileID: 2546332423327978143, guid: 9f84e1b9b912d9b4db6c879e27fa1ff8, type: 3}
highlightMaterial: {fileID: 2100000, guid: fb72f213bae4057419539525b597f16d, type: 2}
previewMaterial: {fileID: 0}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants