Git Product home page Git Product logo

animateuimaterials's Introduction

alt_text

Introduction

Animate UI Materials allows editing and animating materials for a single UI component.

alt_text

You can see such an example in the demo scene.

Setup

To start, simply add the GraphicMaterialOverride component to an UI element, such as an Image with a custom Material

alt_text

When selecting the dropdown “Add Override”, you will be greeted with every possible property you can animate.

alt_text

You can ignore those you don’t know, such as the _Stencil properties. They are internal to UI stencil rendering. Simply select “_Color” for example.

Two things will happen:

  1. A new modifier will be listed in the GraphicMaterialOverride component alt_text You can already edit the color value, and the change will only affect the Image component

  2. A new gameobject will be created, holding a GraphicPropertyOverride component alt_text alt_text The value displayed here is the exact same as in the GraphicMaterialComponent. However this value can also be animated.

Animation

To animate the property, add the usual Animator component to the image

alt_text

Create a new AnimationClip

alt_text

Click Add Property and select _Color Override, then Graphic Property Override Color, then Graphic Property Override Color.Property Value

alt_text

You can now animate the value like any other !

alt_text

Alternatively, hit the Record button, and simply modify the properties from the GraphicMaterialOverride inspector

alt_text

alt_text

End Notes

If you encounter a bug or need any help, please contact me at [email protected]

Don’t hesitate to look into the code if you want to know how things work !

animateuimaterials's People

Contributors

freezx avatar lgarczyn 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.