[RELEASED] Rainity - Dynamic Wallpapers

Overview
Rainity is a helpful package that allows you to display Unity scenes on your Windows desktop with ease. Create interactive wallpapers that display over or under your desktop icons, or use Rainity’s API to retrieve information from your computer! Rainity’s name and idea is based off of Rainmeter, a Windows desktop customization tool.

Screenshots/Media


https://www.youtube.com/watch?v=7qPUiBZ25BM

Key features

  • Unity scenes run right on top of the desktop
  • Customizable settings
  • Get CPU/RAM/VRAM/Disk information
  • Get program icons as usable Texture2D textures
  • Simulate keypresses (including media buttons)
  • Get the desktop image as a Texture2D
  • Functions to add/remove from startup
  • Place window behind desktop icons
  • Multi-monitor support
  • Rainity’s API

Rainity API
Aside from the main Rainity script component, Rainity’s API is a powerful way to customize your desktop application. Functions include getting system performance counters, getting file icons and the desktop wallpaper image as Texture2D’s, simulating keypresses and more. Documentation is included in the package as a .PDF or can be found online here.

Compatibility
This package only operates on Windows computers due to its WinAPI calls. Unity 2018.1.0 and higher are the versions that work with Rainity since the .NET 4.x scripting runtime was officially supported in that version.

Downloads
Download Rainity from the Asset Store
Demo build 1
Demo build 2

Known issues/bugs
Some bugs still persist within Rainity, but are actively being fixed with each update.

  • [FIXED!] Key/mouse input does not work when window is under desktop icons (OnMouseOver, OnMouseEnter, OnMouseExit events still do work, however)
  • [FIXED!] The game’s window doesn’t get recognized if another window is active before Rainity’s Start function is called
  • Some performance counters are off such as the CPU usage and RAM usage
2 Likes

Version 1.4 is here, adding some nice new features!
In Rainity 1.4, you can now:

  • Get the user’s avatar image as a Texture2D (Rainity.GetUserAvatar())
  • Get the logged in user’s username (Rainity.GetUserName())
  • Add an icon to the system tray with a context menu (Rainity.CreateSystemTrayIcon())

I’m continuing to add more stuff to the asset so check back for more new features!
Asset Store Link

This is just brilliant, well done! Bought it straight away!
Just a request if possible, could you include playmaker actions?

1 Like

Versions 1.5 and 1.6 have passed introducing:

  • Mouse and some keyboard inputs work in applications that run behind the icons using a custom input system.
  • Windows audio visualization using a modified example project by hallidev
  • Open files and directories using the default program (Rainity.OpenFile(string fileName))
  • Get weather information including the city name, temperature, 7-day forecast, atmosphere, wind speed, current outside conditions, and more. (Rainity.GetWeatherInformation())

Make sure to check the updated documentation to see how to use these new features!

Hi ckosmic,

Would it be possible to open programs using commands? (like when you use the command line?)

Is is possible to use this as wallpaper if ppl doesnt has unity??

You can open files/directories/programs using Rainity.OpenFile(string fileName). However, command-line arguments aren’t supported yet, but they will be in the next update.

Yes as long as the user running it has a 64-bit computer, it will work. :slight_smile:

Lets say i wana send wallpaper to my friend. Whats procedure to do it?? What will other person need to get this work

All you have to do is send the build to whoever you want to and they can run it on their Windows computer.

How is that guy gona use it as wallpaper??

They just run the build and Rainity does the rest.

I already tried your build and nothing happened??

Are you on a 64-bit Windows computer?

Yes

Ok I tried your 2nd build it works but i dont see my icons

Nice asset :slight_smile: Playing around with it and got relatively quick up to speed. It does not like VR headsets attached functioning as a third monitor. You need to disable the VR monitor before Rainity works fully. Otherwise it’s going to show over that VR monitor as well. Perhaps an idea (if possible) could be to select which screens Rainity should display on.

Anyway, nice work! :slight_smile:

Hi,
This is a great asset! The simplicity and the features gave me some new creation ideas already.
However for my project I need to be able to pick and drag rigidbodies around with the mouse when the app is running behind desktop icons.

I got this script from SharpCoder and edited it so it uses Rainity input system. It works fine in the editor but not in the build when the “Behind Icons” option is on…

using UnityEngine;

public class SC_DragRigidbody : MonoBehaviour
{
    public float forceAmount = 500;

    Rigidbody selectedRigidbody;
    Camera targetCamera;
    Vector3 originalScreenTargetPosition;
    Vector3 originalRigidbodyPos;
    float selectionDistance;

    // Start is called before the first frame update
    void Start()
    {
        targetCamera = GetComponent<Camera>();
    }

    void Update()
    {
        if (!targetCamera)
            return;

        if (RainityInput.GetMouseButtonDown(0))
        {
            //Check if we are hovering over Rigidbody, if so, select it
            selectedRigidbody = GetRigidbodyFromMouseClick();

        }
        if (RainityInput.GetMouseButtonUp(0) && selectedRigidbody)
        {
            //Release selected Rigidbody if there any
            selectedRigidbody = null;
        }
    }

    void FixedUpdate()
    {
        if (selectedRigidbody)
        {
            Vector3 mousePositionOffset = targetCamera.ScreenToWorldPoint(new Vector3(RainityInput.mousePosition.x, RainityInput.mousePosition.y, selectionDistance)) - originalScreenTargetPosition;
            selectedRigidbody.velocity = (originalRigidbodyPos + mousePositionOffset - selectedRigidbody.transform.position) * forceAmount * Time.deltaTime;
        }
    }

    Rigidbody GetRigidbodyFromMouseClick()
    {
        RaycastHit hitInfo = new RaycastHit();
        Ray ray = targetCamera.ScreenPointToRay(RainityInput.mousePosition);
        bool hit = Physics.Raycast(ray, out hitInfo);
        if (hit)
        {
            if (hitInfo.collider.gameObject.GetComponent<Rigidbody>())
            {
                selectionDistance = Vector3.Distance(ray.origin, hitInfo.point);
                originalScreenTargetPosition = targetCamera.ScreenToWorldPoint(new Vector3(RainityInput.mousePosition.x, RainityInput.mousePosition.y, selectionDistance));
                originalRigidbodyPos = hitInfo.collider.transform.position;
                return hitInfo.collider.gameObject.GetComponent<Rigidbody>();
            }
        }

        return null;
    }
}

This is a script you attach to the camera.

Do you have any clue on why dragging with the left mouse button just doesn’t work? Have you already achieved this in an other way?

EDIT: It actually seems to be related to the fact that I have a dual screen.

If you use Easy save, for dynamic settings and things, don’t use Auto Save functions. They seem to break, or interupt, some things Rainity is doing and instead of the application becoming the background it becomes a foreground application.

Guys any1 knows how to get Dropdown in UI working. I tried ranity input system but it doesnt work

Does anyone know how to use the modified windows audio visualizer?? I have looked but i cant find it anywhere