Giter Site home page Giter Site logo

prefsugui's Introduction

PrefsUGUI

Description

The library that auto creation GUI elements by doing variable declaration.

Inspired by fuqunaga/PrefsGUI
PrefsGUI is a so useful library. But, PrefsGUI is using the OnGUI system, So I have some problem by itself.

  • In high resolution display, GUI window is showing like so small.
  • OnGUI system don't have kind and useful visual.
  • I heard that OnGUI system to make a spike sometimes.
  • OnGUI system can't validate about input values.

By uGUI system, I can solve those problems like easy.

PrefsUGUI

Usage

Sample code

using PrefsUGUI;

public class Example : MonoBehaviour
{
    public IReadOnlyPrefs<float> value = new PrefsFloat("value", 10f);  // Read Only Interface.

    private PrefsVector2 vec2 = new PrefsVector2("vec2");
}

If you want to view more details, Let's check Example codes.
Example codes

Behaviour

  • Using the XmlStorage library for saving and loading data.

  • A save key is generate by combine with full hierarchy path and SaveKey parameter.

  • If you attached PrefsParameters component to any GameObject, you can edit AggregationName and FileName for change XmlStorage information that used by PrefsUGUI.

  • I generate and use a dedicated Canvas.


  • You can move uGUI window by mouse moving.

  • If you pressed discard button, back values to last saved.

Implemented type

  • PrefsBool
  • PrefsButton
  • PrefsColor
  • PrefsColorSlider
  • PrefsEnum
  • PrefsFloat
  • PrefsFloatSlider
  • PrefsImageLabel
  • PrefsInt
  • PrefsIntSlider
  • PrefsLabel
  • PrefsRect
  • PrefsString
  • PrefsVector2
  • PrefsVector2Int
  • PrefsVector3
  • PrefsVector3Int
  • PrefsVector4

References

fuqunaga/PrefsGUI
XmlStorage

prefsugui's People

Contributors

a3geek avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.