Wallpaper Manager
Workflow
A component responsible for creating wallpaper items. It only requires a library, which can be selected on Tools > DreamOS > Select Wallpaper Library. You can find this manager under the DreamOS Canvas > Managers parent.
Apply Wallpaper To Objects
It is possible to assign the wallpaper sprite to custom objects. You can use the ‘Wallpaper Object’ component to fetch the current wallpaper. It is also possible to generate selectable wallpaper buttons to any parent using the ‘Wallpaper Library Container’ component.
Scripting
using UnityEngine;
using Michsky.DreamOS; // DreamOS namespace
public class SampleClass : MonoBehaviour
{
[SerializeField] private WallpaperManager wpManager; // Manager variable
void YourFunction()
{
// Spawn the current wallpaper library to a parent
wpManager.InitializeWallpapers(transform.parent);
// Set wallpaper by index
wpManager.SetWallpaper(1);
// Get wallpaper by index
Sprite wallpaper = wpManager.GetWallpaper(1);
// Add wallpaper to library
wpManager.AddWallpaperToLibrary(Sprite wallpaperSprite, "Wallpaper Name");
}
}
How can we help?
A premium WordPress theme with an integrated Knowledge Base,
providing 24/7 community-based support.