World Space Manager
Workflow
A component responsible for handling 3D/world space canvas rendering. It requires lots of resources, such as a main camera, an external camera for OS Canvas, a render texture and an enter mount. Instead of assigning/creating those things one by one, you can simply use ‘Tools > DreamOS > Create World Space Resources’.
Controller
World Space Resources includes a player controller. To get rid of it and implement with your current character controller, here’s a step-by-step guide:
- Select World Space Resources > Player Controller and delete the object.
- Add your main camera to ‘Main Camera’ on World Space Manager.
- In order to move our camera to the mount, we need to disable the camera control On Enter and then enable On Exit. This kind of depends on your camera controller, but you can disable the camera controller On Enter, disable the whole Main Camera object On Enter End, enable the camera object On Exit, and then lastly enable the camera controller On Exit End. This might sounds a bit confusing, but you’ll understand the logic when looking at the example player controller.
- World Space Resources comes with 3D objects. Those are only for Demonstration, you can delete them as you like. Just don’t delete ‘Glass OS Renderer’, which you can find at World Space Resources > Environment > Monitor.
- There’s an object called ‘Enter Mount’. It’s basically an object that makes the transition between the canvas and the camera. You can change its position for your needs.
If you don’t want to use floating icon, you can delete its resources and then leave ‘Use Floating Icon’ field blank. You can also change the transition speed and some other settings via World Space Manager. It requires a collider in order to make the transition, which is attached to World Space Manager.
API / Scripting
using Michsky.DreamOS; // namespace
public WorldSpaceManager wsManager;
void YourFunction()
{
wsManager.autoGetIn = true; // Set auto get in state
wsManager.requiresOpening = true; // Enable or disable DreamOS on enable
wsManager.transitionSpeed = 10f; // Change transition speed
wsManager.transitionInTimer = 0.7f; // Change transition in timer (invoke OnEnterEnd at the time period)
wsManager.transitionOutTimer = 0.55f; // Change transition out timer (invoke OnExit at the time period)
wsManager.GetIn(); // Enable in transition
wsManager.GetOut(); // Enable out transition
}
How can we help?
A premium WordPress theme with an integrated Knowledge Base,
providing 24/7 community-based support.