• Stars
    star
    178
  • Rank 214,989 (Top 5 %)
  • Language
    C#
  • License
    MIT License
  • Created about 3 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Code-based UI library for development menus for Unity

RosettaUI

Code-based UI library for development menu for Unity

public class ExampleSimple : MonoBehaviour
{
    public string stringValue;
    public float floatValue;
    public int intValue;
    public Color colorValue;

    
    void Start()
    {
        var root = GetComponent<RosettaUIRoot>();
        root.Build(CreateElement());
    }

    Element CreateElement()
    {
        return UI.Window(nameof(ExampleSimple),
            UI.Page(
                UI.Field(() => stringValue),
                UI.Slider(() => floatValue),
                UI.Row(
                    UI.Field(() => intValue),
                    UI.Button("+", () => intValue++),
                    UI.Button("-", () => intValue--)
                ),
                UI.Field(() => colorValue)
            )
        );
    }
}

Installation

This package uses the scoped registry feature to resolve package dependencies.

Edit > ProjectSettings... > Package Manager > Scoped Registries

Enter the following and click the Save button.

"name": "fuqunaga",
"url": "https://registry.npmjs.com",
"scopes": [ "ga.fuquna" ]

Window > Package Manager

Select MyRegistries in Packages:

Select RosettaUI - UI ToolKit and click the Install button

Input System(optional)

RosettaUI recommends using Input System.
See Tips.

Install according to the official documentation.
https://docs.unity3d.com/Packages/[email protected]/manual/Installation.html

How to use

  1. Put Packages/RosettaUI - UIToolkit/RosettaUIRootUIToolkit.prefab in the Hierarchy
  2. Write code to generate Element instance
  3. Call RosettaUIRoot.Build(Element) to generate the actual UI ( Example )

Examples are available in this repository. I recommend downloading and checking it out.

Functions

UI.Field()

UI.Slider()

UI.MinMaxSlider()

UI.List()

Layout elements

And more!

Please check the Examples

Enviroment

Platform Support
Windows ✔
Mac Maybe(not tested)
Linux Maybe(not tested)
IL2CPP Suspended
UI Library Support
UI Toolkit ✔
UGUI Suspended
IMGUI Not planned

Tips

Disable keyboard input when typing in UI

When using InputSystem, set RosettaUIRoot.disableKeyboardInputWhileUITyping=true (default) to disable keyboard input while typing in UI.

// false while typing in UI
if ( Keyboard.current[Key.A].wasPressedThisFrame )
{
    // do something
}

For LegacyInputSystem, refer to RosettaUIRoot.WillUseKeyInputAny().

if ( !RosettaUIRoot.WillUseKeyInputAny() && Input.GetKeyDown(KeyCode.A) )
{
    // do something
}

See also

PrefsGUI - Accessors and GUIs for persistent preference values using a JSON file

More Repositories

1

RapidGUI

Unity OnGUI(IMGUI) extensions for Rapid prototyping/development
C#
294
star
2

GpuTrail

ComputeShader implementation trails for Unity
C#
119
star
3

ComputeShaderBVHMeshHit

Unity ComputeShader implementation of BVH(Bounding Volume Hierarchy) based mesh hit checking.
C#
63
star
4

VatBaker

A tool to bake VAT (Vertex Animation Texture) from AnimationClip with sample shaders for Unity.
ShaderLab
42
star
5

VFXGraphSandbox

Unity VFX Graph technical experiment.
C#
42
star
6

SyncUtilUNET

Sync Utilities For UNET
C#
38
star
7

QuadWarp

QuadWarp sample code for Unity
C#
27
star
8

DomainWarping

Domain Warping implementation for Unity.
HLSL
19
star
9

GpuLifeGame

C#
14
star
10

MirrorReflection

http://wiki.unity3d.com/index.php/MirrorReflection4 modified to support to unity default Quad.
C#
14
star
11

CameraProjector

ShaderLab
14
star
12

Headquarters

GUI tool for remotely operating multiple windows PCs using PowerShell
C#
12
star
13

MeshDivider

Simply Grid-based mesh dividing tool
C#
10
star
14

UnityStartupBat

Batchfile
7
star
15

PrefsGUISyncForMirror

Sync subset for PrefsGUI over Mirror
C#
6
star
16

UnityUtil

Miscellaneous utilities for Unity
C#
6
star
17

SyncUtilForMirror

Sync Utilities For Mirror
C#
6
star
18

GPUFluid

C#
6
star
19

DataGridSelectAll

SelectAll Checkbox on DataGrid that bindings DataTable
C#
5
star
20

Grid3D

simple 3d grid renderer for Unity
GLSL
5
star
21

PortalGate

An experiment of a functional clone of Valve's Portal on unity.
C#
5
star
22

RoomProjection

C#
4
star
23

ColorSpace

Color space conversion for Unity hlsl
HLSL
4
star
24

SpriteChanger

Replace Sprites And AnimationClips In AnimatorController For Unity.
C#
4
star
25

VersionUpdateOnBuild

Set PlayerSettings.bundleVersion OnPreprocessBuild
C#
3
star
26

PrefsGUISyncForUNET

PrefsGUI subset for synchronization over the network
C#
2
star
27

MaterialPropertyAccessor

C#
2
star
28

DeterministicCalculationChecker

C#
2
star
29

PrefsGUI-PostProcessingURP

PrefsGUI extensions for URP PostProcessing
C#
2
star
30

irc_log_viewer

IRC log viewer for web browser.
JavaScript
1
star
31

LabelNamePropertyAttribute

C#
1
star
32

AmazonWishListPoint

Chrome Extension: Add a function to display points on the Amazon wish list
JavaScript
1
star
33

PointCluster

C#
1
star
34

TexturePatchwork

Cut out any portion of a texture and paste it onto another texture.
C#
1
star