GithubHelp home page GithubHelp logo

invexgames / materialui Goto Github PK

View Code? Open in Web Editor NEW
768.0 768.0 199.0 32.9 MB

MaterialUI is a UI kit for Unity that follows Google's official material design guidelines.

Home Page: http://invexgames.com/materialUI.html

License: Other

C# 100.00%

materialui's Introduction

MaterialUI

Check out the new MaterialUI here!

MaterialUI is a UI kit for Unity that follows Google's official Material Design guidelines.

Please note that this package is outdated and is no longer worked on nor supported. You can find the shiny new version of MaterialUI on the Unity Asset Store, which is better, faster, and more feature-packed! It's also still being updated with new features and improvements.

I'd advise only using this for learning purposes, as it probably won't work well with recent Unity versions.

You can contact me at [email protected], but providing support for this package isn't my top priority.

materialui's People

Contributors

benjiko99 avatar decsmith42 avatar geekoftheweek avatar invexgames avatar nah0y avatar rorydungan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

materialui's Issues

EditorTool for components

Hey :)

Instead (or in addition) to creating components from the MaterialUI menu where there is only text, and we don't always now what the component looks like. Once thing we can do, is create an editor window, with the entire list of all the components (with a picture), so you can directly see the component you're about to create, and we could even give a title + description!

In fact, this is just like in VisualStudio for example where you see all the components, or any IDE in fact that does that :p

In case this is not clear, on the left of these images for example:
On the left

On the left

Input Text performance issue

So I was trying out the text input.
If you try to type something really fast, it'll drop the frame rate to zero and gets stuck for a second or so.

Is this Unity UI's issue or MaterialUI?

Feature: Dynamically add ListItems

Hi there,

it would be nice to be able to dynamically add ListItems via code and that the ListItem resizes depending on the text length.

Generally it would be nice to have list items with more than three columns and it resizes automatically.

Countdown Game - First experiement with this awesome asset

Hello Devs,

  • First, I would like to extend my thanks to both Saxy_Man and ahcookies for the valuable Unity3D Material design package which we took advantage off to create our number puzzle game.
  • The asset provides a wide array of controls to use. We then added our own choice of colors to create the overall UI look and feel.
  • The game is based on the famous TV Show "CountDown" and the rules are quite simple: build equations from 6 numbers until you find a designated number
  • Please do enjoy and we are open for all types of feedback. (Link to the game can be found at the top)
  • We are constantly improving the product as necessary and keep up the great work with the package

Thanks,

Link to Playstore: https://play.google.com/store/apps/details?id=com.runjumpfall.sixtoone

SelectionBox component fairly broken

Just thought I'd let you guys know, I'll fix it when I can.

So far I've noticed the 'highlight last selected' and 'expand direction' options don't work as they should.

Resize switch

can you explain how to resize the switch. i am directly put it by drag and drop from prefab folder. but while resizing it, not woriking properly. any idea on this.

P.S It's a really amazing UI kit i ever found.
Thanks

Text Inputs not able to re-size for paragraphs

First of thanks for this unity package, its beautiful and super helpful. Now i'm not sure if this is a desired feature or not, but the Text Input prefabs do not re-size for long strings. For example, if the user wanted to write there own little paragraph, the input field gets cut off and only stays on a single line. I tried setting the horizontal and vertical text to "Overflow" but this seems to be getting overridden somewhere. Is this something I'm doing wrong? Is this a desired affect? If not, any Ideas for a fix?

Colliders on Switchs too big?

Also, one thing really weird, if you have multiple switch, it seems like only one of the switches receives input from the click... And I suspect the shadow being really big, blocking the input of others.
So if you have an inactive switch next to an active one, you won't be able to click on the active one for example because it is blocked by the shadow collider of the inactive one.
Or if you have two active next to each other and click on the first, it's the second who receives the event.

I'll soon push to a branch the example switch scene, you'll see the issue.

Can't Instantiate

Sorry for my bad English.
So, when I try to instantiate any element, I get:

ArgumentException: The thing you want to instantiate is null.
UnityEngine.Object.CheckNullArgument (System.Object arg, System.String message) (at C:/buildslave/unity/build/Runtime/Export/UnityEngineObject.cs:102)
UnityEngine.Object.Instantiate (UnityEngine.Object original) (at C:/buildslave/unity/build/Runtime/Export/UnityEngineObject.cs:87)
MaterialUI.MaterialUIEditorTools.CreateCheckbox () (at Assets/MaterialUI-master/MaterialUI-master/Editor/MaterialUIEditorTools.cs:179)

Any ideas?
Unity 5.1.1 Personal, Android Project

Asset Serialization to ForceText?

Hello,

Just wanted to know if in Edit/Project Settings/Editor you had Asset Serialization set to Force Text?
Because it seems that all your prefabs in ComponentPrefabs and the colors such as Editor/01 - Red are binaries (downloading the raw file from github and opening it, we can see that it's binary).

The issue is that opening these in Unity will reserialize everything and git will mark these files as modified :/
If you already have ForceText, maybe it's because I'm working with a different version of Unity? Which one are you using? Thanks!

Add Text for ComponentPrefabs

Hello,

I've just noticed that there is no single Text component in the prefab and in the MaterialUI menu.
It will be really handy to create a Label just like any other component ;)

Closed Dialogs / Nav Drawers Render Off Screen

Closed dialogs and nav drawers continue to render after they have been closed and moved off-screen. Can these objects be deactivate or not rendered when they are closed so that they don't eat up precious draw calls on mobile?

List View / List Items

This would be awesome, and I think we need that almost in every game/software: http://www.google.fr/design/spec/components/chips.html

It's basically just a "row" component, that act like a button, you put everything you want in the row, and it's clickable as a button.
Currently I can't take a common button and use it for that, because when I resize it, it breaks the background and shadow of the button.

ArgumentException: The thing you want to instantiate is null

I imported the whole package in my project. It works fine!

I can easily create ui elements by dragging them from the folder "ComponentPrefabs" to my hierarchy.

However, when I want to directly create an ui elements using right click mouse button in the hierarchy and selecting "Material UI", I always get the same error message :
UnityEngine.Object.CheckNullArgument (System.Object arg, System.String message) (at C:/buildslave/unity/build/Runtime/Export/UnityEngineObject.cs:102)
UnityEngine.Object.Instantiate (UnityEngine.Object original) (at C:/buildslave/unity/build/Runtime/Export/UnityEngineObject.cs:87)
MaterialUI.MaterialUIEditorTools.CreateRoundButtonRaised () (at Assets/UI Google/Editor/MaterialUIEditorTools.cs:136)
UnityEditor.GenericMenu:CatchMenu(Object, String[], Int32)

Switch active/inactive state

Hey :)

Try to create a switch and play with interactable/isOn.
If you have interactable unchecked, and toggle isOn (true to false, then false to true etc...) you'll see that the switch changes color instead of using the disabled color.

Qualcomm Vuforia package conflicts

Importing the MaterialUI package along with the Vuforia package causes compiler errors.

Sample error:
Assets/MaterialUI/Scripts/CheckboxConfig.cs(49,48): error CS1061: Type Image' does not contain a definition forgameObject' and no extension method gameObject' of typeImage' could be found (are you missing a using directive or an assembly reference?)

Issues with sliders

Sliders! :D

  • I can't find a correct way to resize the width of a slider
  • I think most of the time, we want to display a slider with a label of the left. To show what the slider is for. Maybe you could add a "Slider with label" in the MaterialUI menu creation?
  • When I change the position of the RectTransform of a Slider, it does not update the position right away, I have to change the scene, or click outside of the position fields of the inspector window
  • Is there a reason the Slider has a HorizontalLayoutGroup attached? Because if we want to add other things under this gameObject, it will be repositioned. (I know I can add component on what I have to stop that, but is this a behavour you want?)
  • Better way to change slider color? right now if you want to change the color of the slider, you need to change the color of 3 components, might be better to have that directly on the SliderConfig script?
  • When you click on the slider (the huge long bar), it seems like you have to click on the exact bar (2px height) to move the slider to the position you clicked.
  • Setting interactable to false, deactivate the slider, but there is no deactivated color, and the slider thumb still grows when we mouse over.

I have pushed the Sliders scene so you can play with it while fixing the issues.

Close Selection Box

Hi! How to close selection box using script when user open it but didnt select anything and pressed another button? Is there any function in Selection Box Config?

Button manual resize Isn't working ...?

According to the wiki I'd only have to edit the width/height of the RectTransform, I can resize it in the Editor, but in runtime mode it resizes back to the text bounds.

Is it a bug or did miss any option?

Component: Toast

Hello!

I wanted to do a demo scene for the toasts, but it seems broken.
It was working really nice before, now, when you call the Toaster.PopupToast method, it creates a huge Toast of 1000x1000.
It's also really weird, because putting the Toast prefab in the scene (the one in Resources), it's 1000x1000 and I can't resize it. The only thing I can do to make it have its size back is doing a small modif, then pressing Ctrl+Z... lol

Anyway, I think the way the Toast is handled is really complex for no reason.

  • I understand that we need to add a gameObject with the Toaster script on it so it can be in the scene, and it can be drag&dropped in a button event to trigger it.
    The thing is that, if that's the case, then why not just have directly in the scene a gameObject called ToastManager, that is in the empty scene directly?
    It's really confusing to have an empty gameObject, where you just attach a script like that.
    On top of that, it's even completely useless to have that, because you can only call the PopupToast public method and can't pass a string parameter to say what you want to display in the message.
    So if you want 2 different toasts, you have to create 2 empty gameObjects with the Toast component on them, define a different text for each one, and can't even change that at runtime :/
    Even if that's what you want, why can't you simply let people create a real Toast component, like the Toast prefab in resources, so they can have visual feedback on the toast and not have an empty gameObject?
  • Anyway, all of this to say that I think that toasts need to be called only from script, or maybe if users don't want to call them by script, they need to place directly the toast component (with UI etc...) wherever they want and link the event to this particular toast. But I don't know how this is useful...
  • The ToastControl class is weird :/ I mean, why do you ok you load the Toast component from memory in InitToastSystem, but why don't you just do that in the ToastManager script (the one who is called Toast right now)?
    And then you have the MakeToast method, that store values in static variables, then instantiate the toast, why don't you just instantiate the toast, get the component attached on it and call a init method passing all the variables?
  • Also, instead of just having one method with a lot of parameters, I would add one with just a string for the text that will use the other default values, much easier to use for 99.99999% cases.
  • I would have renamed PopupToast to simply Show.

In conclusion, what I think is best, is add a menu where user can create a ToastManager, that will place the ToastManager gameObject correctly in the canvas (and will be the parent of the toasts).
This ToastManager do not have any variable, so nothing is exposed to the inspector. It's just here to be the parent of the toasts, and initialise things.
Rewrite a little the Toast classes to remove all the unnecessary code.

And the test scenes will have to call the toast via script.

If you really want to have a toast component with color, text, duration etc... exposed to the inspector, you can maybe make a ToastTrigger component that one can attach to a gameObject that has a button for example, and they will drag&drop this component in the button event method.
Maybe that's not a bad idea :D

And for the last thing about toast:

  • It will be great to have 2 different toasts, one normal (the one you already have) and another one with a button on the right (to display "Cancel", "Discard" etc...)

PS: I don't know if you want to do it yourself, but if you want me to do it, just tell me I'll try to get into it ;)

MaterialUI as a Git Submodule

Hello there,

Great work on MaterialUI, it's really an awesome extension / graphics library. I'm using it in my own GitHub project and since you are so regularly updating it, I thought I would clone it into my project using a Git Submodule. The issue here is that in doing so, the whole project is copied because git doesn't allow partial syncing of repositories. Therefore I suggest reordering the MaterialUI GitHub to only include the MaterialUI folder (especially now that you've organised everything so neatly inside it). All the other Unity files should be handled by each individual project.

I really hope to see this in a future update, it makes it much easier for people to keep their MaterialUI updated. Keep it up! ๐Ÿ‘

Wiki Entry / Tutorial Requests

Hey guys! If you're unsure of what something does, or how to do something, check out the wiki to see if it's there.

If it's not, or you need more info, or a video tutorial, let me know here!

EZAnim - Object reference not set to an instance of an object

I've been using EZAnim a lot lately, and for quite a while, but randomly now I get this error when trying to use (EZAnim Variable).Animate(); or (EZAnim Variable).AnimateAll();

NullReferenceException: Object reference not set to an instance of an object
MaterialUI.EZAnim.AnimStruct (Int32 i) (at Assets/MaterialUI/Scripts/EZAnim.cs:67)
MaterialUI.EZAnim.AnimateAll () (at Assets/MaterialUI/Scripts/EZAnim.cs:136)

This randomly happens on random triggers, with them occasionally fixing themselves for no apparent reason. I looked into the error a bit, and at line 67 in EZAnim.cs, it has this

activeList[i] = true;

Now I did some digging and the variable that it is looking for is there, as far as I know. My best guess is it is throwing the AnimStruct function a bad number, making it look for a variable that doesn't exist. If you could help me fix this that would be great!

Thanks,
DrabWeb

Use from the Unity Package Manager

Hello,

I have a question about if this project is abandoned or not. Because I've seen that there's no commit since 4 years ago, and there're issues without answer or still opened.

Also, is this repository going to be updated in order to be compatible with the package manager? I think this repo would need a package.json manifest file at the root folder, as specified here, in case that you want to make people import this repository from the package manager. About this, I am trying to do so in a fork of the project, to be able to use this asset from the Package Manager (importing from a git URL), but it would be nice if the original repository gets updated.

It's a very nice asset! I hope this is not abandoned.

Thank you in advance.

Moving MaterialUI Folder into Subfolder

Hello,

I wonder, if it's possible to move the root 'MaterialUI' Folder into a subfolder.
Right now, the GUI from Unity3D work properly, but when i want to create some Buttons, i always get the message that an GameObject cannot be instantiated.

Thanks

Web build code doesn't compile

When making a web build, this error occurs Assets/MaterialUI/Scripts/ShadowGen.cs(292,40): error CS0117: 'System.IO.File' does not contain a definition for 'WriteAllBytes'.

From cursory investigation it's because I'm in web build mode and web builds don't have that method defined. I see that file is Unity Editor only, I have just commented that line out as a temporary solution.

ScreenManager?

I'd love to see a demo (gif/video) of what the screen manager does.
I'm sure it's something to easily move from one UI to another, but never saw that in action :)

Menu Component/MaterialUI/(VARIOUS COMPONENTS) can't be checked because doesn't exist

I try to run my Unity project for Android (not sure if that matters or not) but I get multiple errors from the same source saying "Menu Component/MaterialUI/Toaster can't be checked because doesn't exist". When I look for these files, they do exist in its proper place and I don't see anything wrong with them.

Can anyone help me figure out why it is saying these files don't exist when they do?

Here is the screenshot of my work environment (https://imgur.com/ZW5BUTQ)

unityerrorscreencap

There is a similar question posted but there is still no solution.

Mesh.createVBO - Performance issues

After adding about 100 List Items to a ListView the app runs very slow on a Samsung Galaxy S2.

Unity 5 profiler:
Mesh.createVBO is the most expensive process

Snap button to text

Just a suggestion,

Why don't you put something in the Update of the script, so it can check every frame (in editor only) if the text has changed, if it has, you just call the method to snap the button to text.
So we don't have to press the button snap and save the scene to make things look good?

RippleMask blocks input after ScreenConfig.Back is called

After calling Back() on a ScreenConfig, the ripple mask object of that screen stays in place after the animation has finished playing and, while it is invisible so doesn't visually obscure the new screen, still blocks clicks and touches.

This seems to also have something to do with timing of the animation since as the animation plays, the ripple mask shrinks and sometimes becomes so small that it isn't noticeable.

Component: Dialogs

I had to fix 2 of the 3 popups because they were using outdated buttons.
The popup examples are great, but I think that that's what they are, popup examples. They are examples of popups people can create and have in their scene to call.

What would be way better, is to create a bunch of different dialog types (see below), and allow users to call them via code (same thing than the Toasts). Because if you have 200 different dialogs in the game, you will certainly not create all of them in the scene and just display them.

So, once thing awesome, would be to have a DialogManager, on which there is multiple public methods to display different dialogs, such as :

And even better, it could be just 3 different prefabs, the first one for the basic things, the second for the select, and the third for image select.
And we could have just one public method call for each, that requires title, text, button1, button2, and if you pass null to one of them, we do not display the title, or do not display 1 or all the buttons etc...

All of these dialogs will have a scrolling by default? Like, if the content is bigger than the height of the screen, it become scrollable? I don't know :/

And if someone wants to use a custom dialog, either he will use one that he already added in the scene, or better, we could add a public method, that take a Resources name as parameter, such as:
DialogManager.ShowCustomDialog("MyGreenListDialog") it would maybe return the gameObject that has just been instantiated. So users can just have MyCustomDialogManager for example, and do what they want with it inside (we could provide one as example).

What do you think about all that?
Do you want to do it? Or should I? :)

RadioButton Icon Checkbox Toggler

That's really nice that you added an Icon to the RadioButton, Checkbox component etc... (with the text) but I think they need to have the CheckboxToggler script attached to them :)

Error On Package Import (0.2.2 And Above)

When I imported the package, I got this error

Assets/MaterialUI/Scripts/Components/ButtonConfig.cs(35,31): error CS0723: MaterialUI.ButtonConfig.inkBlotsControl': cannot declare variables of static types

I tried fixing it multiple ways, but when I actually get it to run, the ink blots don't work. I would be very happy if you could help me, as I love the new features!

Thanks,
DrabWeb

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.