How can i add "world scale" to a sliderui with the variables?

Blazedplayz

New member
Messages
6
Reactions
2
Points
3
Im quite new to this app and i cant seem to find world scale anywhere on it for the life of me
andim not talking about the scale of objects, im referring to the "world scale" slider that lives in the Scene Misc

and i just cant find it anywhere in the "receiver atom" "receiver" and "receiver target"
 
Save this like custom/scripts/worldscale.cs
C#:
using System;
using UnityEngine;

namespace SPQR
{
    public class WorldScale : MVRScript
    {
        JSONStorableFloat scale;
        public override void Init()
        {
            scale = new JSONStorableFloat("scale", 1f, ChangeScale, 0.001f, 100f, true);
            RegisterFloat(scale);
            CreateSlider(scale);
        }
        void ChangeScale(float n) => SuperController.singleton.worldScale = n;
    }
}

And add it as a scene plugin, or to any atoms. I didn't test it but it should work. The extra scale freedom might not work, likely vam will limit it to its own slider values 0.10 to 40
 
Back
Top Bottom