User Manager
Workflow
A component responsible for managing and creating the user. You can find this manager under the DreamOS Canvas > Managers parent.
Disable User Creation
While you can let users to create their own profile, you can also set a pre-made user by enabling the ‘Disable User Creating’ option.
Get User Info
If you want to fetch the user data, you can use this component. It doesn’t require any external resources. You can enable ‘Update On Enable’ to fetch the data on enable.
Profile Picture Library
Profile picture libraries allow generating profile pictures for the user. You can see the default library using Tools > DreamOS > Select Profile Picture Library.
Scripting
using UnityEngine;
using Michsky.DreamOS; // DreamOS namespace
public class SampleClass : MonoBehaviour
{
[SerializeField] private UserManager userManager; // Manager variable
void YourFunction()
{
// Set data
userManager.SetFirstName("First Name");
userManager.SetLastName("Last Name");
userManager.SetPassword("Password");
userManager.SetSecurityQuestion("Sec Question");
userManager.SetSecurityAnswer("Sec Answer");
// Set profile picture by index
userManager.SetProfilePicture(0);
// Lock the system
userManager.LockSystem();
// Close lock screen
userManager.CloseLockScreen();
// Show or hide desktop
userManager.ShowDesktop();
userManager.HideDesktop();
// Force to login
userManager.Login();
}
}
How can we help?
A premium WordPress theme with an integrated Knowledge Base,
providing 24/7 community-based support.