A Unity ID allows you to buy and/or subscribe to Unity products and services, shop in the Asset Store and participate
in the Unity community.
Discussion in 'Assets and Asset Store' started by ilih, Feb 11, 2015.
Strange, I cannot reproduce it.
What player settings you use for Android builds?
And try to create ScrollView with lots of text and check will be text displayed correctly or will be visible out of bounds as ListView items.
I've added the scripts but the following error appears:
Assets/ThirdParty/UIWidgets/Standart Assets/Calendar/CalendarMultipleDates.cs(5,21): error CS0234: The type or namespace name `Attributes' does not exist in the namespace `UIWidgets'. Are you missing an assembly reference?
Could you provide sample project or at least some scripts with your implementation?
ilih Thanks for trying and your help, much appreciated. Fortunately the answer is in this article https://stackoverflow.com/questions/29213751/unity-5-ui-mask-issues-android
Build Settings -> Player Settings -> Resolution and Presentation -> Disable Depth and Stencil (unchecking)
This worked, also a problem with the rounded corners on the buttons are solved now.
It's my mistake, this namespace now available only in beta version.
So you need to remove this namespace with "[DataBindField]" attribute from DataSource property or update to 1.10.0b12.
I am using the spinner with format 0.00 and now I want to change the value programmatically. However, unfortunately the text of the spinner is not updated and stays 1.00. (It works fine using the arrows)
spinner.text = "4.00";
How can I programmatically update this value?
You should use Value property, not text, and it will be formatted automatically.
spinner.Value = 4;
spinner.Value = 4;
ilih Thanks, seems obvious now, mistakingly I replaced my spinnerfloat with the spinner. That's why I was fixated on the text value.
I am generating TreeView ListItems programmatically (TreeNode<TreeViewItem>). Everything works fine.
However, the ListItems do not have the same format as the DefaultItem, which I customized. The text is still the standard yellow-ish, although the TextObject of the DefaultItem has green text. The background color of the generated ListItems is also not as I set it in the DefaultItem.
The Toggle of the generated ListItems however is fine - it is just as I set it up on the DefaultItem.
Am I missing something? Do I need to manipulate the TextObject and everything manually, when generating ListItems programmatically? But then again, why is the Toggle fine?
Thanks in advance!
You need to change default colors in TreeView component.
Colors applied only for Text components and DefaultItem.Image component (it's background) and this is why Toggle is fine.
Colors needed to make default, hovered and selected items visually distinct.
Or you can create own DefaultItem component with changed GraphicsColoring method:
public class TreeViewComponentCustomColoring : TreeViewComponent
public override void GraphicsColoring(Color foregroundColor, Color backgroundColor, float fadeDuration = 0.0f)
// apply custom coloring or do nothing.
Ah! I got it. Thank you very much. Very good support!
Is its possible if user click on any where in other then sideblock it close it self ?
just like farmvilla when use click on anywhere other then sideblock it close it self
if not then it would be great to have it.
You need to enable "Modal" option.
its not working if you put and other canvas as content in it.
Sorry, not really understood.
Can you show hierarchy window screenshot when sideblock opened, what objects have canvas components and where you click to close sideblock.
Or maybe you miss adding Graphics Raycaster component to Canvas? Without Graphics Raycaster component clicks will be ignored.
How I Can get actual Physical GameObject From ListView dataItem ?
for example I have flowing list and I want to get actual gameObject showing Algeria data.
it could data index or actual that should be used to get physical item.
You can get component by index using GetItemComponent() method, and get gameObject from it.
Warning: component can be null if item not visible.
var component = list_view.GetItemComponent(indexOfAlgeria);
// do something with component.gameObject
component.gameObject.name = "Algeria";
@ilih I recently decided to use uiwidgets for horizontal scrolling list/tileview thing, here're some pain points I've encountered:
1) folder 'Standart Assets' - this folder contains scripts of the package. Name it as such, please (!). I.e. just 'Scripts' would do. ( apart from the fact that the word Standart with the 't' at the end does not exist, it's also confusing since there is Unity's own 'Standard Assets' folder )
2) 'Sample Assets' - this folder contains example scenes, script and prefabs (see further) of the package - name it as such, please. Just 'Examples' or 'Samples' would be _perfectly_ fine
3) 'Sample Assets' folder contains sample scenes, but also some prefabs. Why ? There is 'Prefabs' folder for this. super confusing ! ( While you're at it, get rid of 'Prefabs/Old' if they're no longer needed )
- The prefab TileViewSample I was looking for is quite unintuitively buried in Sample Assets\TileView.
(it's fine to have sample components just for the scene, but don't make them prefabs then, or if, do it properly with Prefabs folder)
4) Since I needed text mesh pro I used the one of the TextMeshPro Support Packages
That's fine if you decided to do it this way, but please make them having content parity with the main package then
(i.e. all prefabs and example scenes) ( I might be wrong about prefabs since not all necessarily use text/labels and I didn't thoroughly review them )
Personally I think better way would be to make components handle both (UGUI and TMPro) in single code base and let the user choose which one to use based on e.g. a project wide #define - (with the user responsibility if it's changed)
- but there are maybe more options for this. Either way majority probably better than the the current one -)
5) UIWidgets dirties the scene constantly which needs saving without any visible user changes (I can look up the diff if you want later)
There are more things like this, and it's a good asset otherwise! please take this as constructive feedback
well, this probably won't work since you loose all references don't you. In that case package is probably a must
I'm having difficulty while using SlideBlock.
I think its probably a bug.
you can reproduce it with following steps.
1- slideBlock.Open() ;
2- slideBlock.Close() ;
3- slideBlock.Open() ;
and it will not open. it will remain in closed state.
1- slideBlock.Open() ;
2- slideBlock.Close() ;
3- slideBlock.Open() ;
and its should be opened , before OnOpen event there should be OnClosed event. where we should do our closing stuff.
it would be great to have
events as well.
Thanks for your response.
1, 2 - I want to rename those folders long ago, but I afraid that after update users will have two folders: one with the old name and new renamed, also a lot of errors about names conflict. I could not any documentation about how assets package import works with renamed folders and files.
3 - Your right. I'll delete them.
And maybe I replace all prefabs with scripts to create them like the default Unity widgets (this will help to avoid missing reference errors after Unity version update)
4 - I'll think about content parity - the problem is should the prefabs and example scenes without text duplicated or not. In current version prefabs without text not copied to TextMeshPro Support Packages.
And probably will be only one context menu instead of two: if support package installed will be used prefabs with TextMeshPro support.
5 - What Unity version you use?
Open() and Close() functions does not change state if sidebar running open or close animaton.
You can use SetOpen() and SetClose() to change sidebar state withour animation or add the following code to Sidebar.cs and use ForciblyOpen() and ForciblyClose() to change state with animation.
/// Forcibly open this instance with animation.
/// Already running animation will be cancelled.
public void ForciblyOpen()
/// Forcibly close this instance with animation.
/// Already running animation will be cancelled.
public void ForciblyClose()
/// Forcibly the animate to specified state.
/// Already running animation will be cancelled.
/// <param name="shoudBeOpen">If set to <c>true</c> state will changed to open.</param>
protected void ForciblyAnimate(bool shoudBeOpen)
isOpen = !shoudBeOpen;
I can add them, but those events will not be called if a user manually drags the sidebar because he can drag it to any state.
That's not how Unity package importer works (for a (very) very long time now -)
The importer looks at assets first (I believe according to their hashes): when you rename a folder after import, but don't change any content, the importer will not detect any change and even if you click OK in import window, nothing will be by default imported - since all assets are not checked in it when/if they're the same.
(I think it even does not display any import tree when the folders were unchanged, but expands it if some folders were changed, but does not select any asset/s as mentioned above)
You can easily verify this: import package into new project, rename a folder and then import it again.
So users with (future) previous versions will be fine - it will keep the old folders, new imports will be 'correct'.
I don't have an exact link, but it's there since 5 for sure, and very very likely in 4. For 5 and up there's no reason to not rely on this I'd say.
Yeah, something like that, although I think you'll probably hit few obstacles, especially with serialized references in prefabs.
A separate package is not _that_ a terrible obstacle though; and probably the easiest solution tbh since just sample scenes should be missing.
2017 LTS, but it was there all along in 5.5/6 IIRC
I suspect EasyLayout, but that's just a hunch didn't research this properly
Oh btw the way importer does it in 2017 (don't know if it's new or not) it displays assets in user's rearranged project tree in import window
I believe before it moved the asset in the project if user chose to import it regardless
So, I really wouldn't worry about any duplicates
I found in what cases this is possible: if one of the elements under EasyLayout control change its Min, Preferred or Flexible size when its actual size changed. I'll try to find a way to avoid it.
Hi I'm getting an error with the latest unity version.
The items are all stacked on over the other and there is apparently a problem with easy layout
There is a screen shot attached
Please try to re-import package and create widget again.
Sometimes after import script references became broken, trying to import again, usually this is fix problem.
If error not fixed after this I create package special for this Unity version.
I made a package for Unity 2018.2.2f1, you can download it here. It should not have import errors with latest Unity version.
Does this work in VR? I’d like to have a 3D canvas, use VRTK laser pointer to manipulate/select UI items, on Oculus Go (android). Particularly interested in the tree view.
It uses Unity UI: if default Unity widgets work so will be work New UI Widgets.
I remembered: already was the question about VR and VRTK https://ilih.ru/unity-assets/UIWidgets/#comment-3980479093 , apparently its work, but was a small problem with a double click which easily fixed.
What's the status of 1.10 development? Is a stable release coming soon? Thanks
Will be released at the end of this month if nothing happens.
I tested the code with a new project and ti worked. Now I am recreating my project from zero to see what broked it.
I have the latest unity 2018.2.3f1 and I tried to update with UIWidgets.1.10.0b12-Unity2018.2.unitypackage
but now, my listview are broken : it seems that easylayout does not compil (dont know why)
here is the picture :
any ideas to solve it ?
thanks in advance
Please show what errors are displayed in the console? You can open it with Window - General - Console or Ctrl+Shift+C.
Probably you will have a few errors regarding "GetBuiltinResource", those errors are safe, should be other compile errors.
I made a package for 2018.2.3f1, please try it.
Thanks for your fast answer
I think I found the issue (but not the fix)
start a new project, add package, add ListView prefab on scene : everything is OK !
now go to setting, change to .NET4
and again : add ListView prefab on scene :KO !
ListView>ScrollRect>Viewport>List <---- here the script EasyLayout is dead
EDIT : I finally managed to make it work on a brand new project. so I just copied all my old project in the new one... It does the job ! good continuation on your very good asset!
Are you drag&drop ListView from Prefabs folder?
A better way is to use the context menu.
I found problem: if the namespace has a class with the same name as the namespace then Unity 2018.2 ignore this class.
To fix it you need to rename "EasyLayout" namespace to "EasyLayoutNS":
- open EasyLayout.cs
- place cursor at "EasyLayout" in the first line "namespace EasyLayoutNS"
- press F2 to rename
- change name to EasyLayoutNS
your small fix did not work (add EasyLayoutNS). Could you please create a new package with this fix ? It would be great !
(also new unity version 2018.2.4)
Thanks in advance
You can open EasyLayout.cs in Inspector windows to check if a problem exists.
Unity does not recognize script if a class has the same name as the namespace.
No problem if class and namespace have different names.
I have a problem with PC - it suddenly restarts. Probably this will be fixed at the end of the week.
So the new release will be delayed to mid-September.
About TextMeshPro support for Unity 2018.1 and later
The new version of TextMeshPro uses a new GUIDs and this is why support package does not work by default. You need to convert existing files to works with new GUIDs after importing the package or updating to 2018.2.
TextMeshPro package has tools to convert files automatically:
Open Window -> TextMeshPro -> Project Files GUID Remapping Tool
Press "Scan Project Files" (you should change project settings to Version Control = "Visible Meta Files" and Serialization = "Force Text" if not you will see a notification)
Save modified files after a scan.
Sorry, I underestimated the time required to finish all planned features.
Here is pre-release 1.10.0b15.
All requested features are done.
- widget generation (now available only scripts generation, use context menu "Create / UIWidget - Widget" on file with item class)
- TextMeshPro support for the new version
- new demo scene
- Added styles support (Styles folder, new styles can be created from context menu "Create / UIWidget - Style")
- Added DateTime, Time24 and Time12 widgets
- Added DateTimePicker and TimePicker widgets
- Added ColorPickerRangeHSV widget
- Added ColorsList widget to display list of the selected colors, should be used with ColorPicker or ColorPickerRange.
- Added "Data Bind for Unity" support (requires Unity 5.6 or later)
- Added base ListView Picker class for the custom ListView
- Added base TreeView Picker class for the custom TreeView
- Added base drop support class for the custom TreeView
- Added base drop support class for the custom TreeView node
- Improvement: Drag can be canceled with Cancel button
- Accordion: added AllItemsCanBeClosed option
- Autocomplete: added GetInputFieldText() function
- Calendar: added DateMin and DateMax properties
- Calendar: added currentDateAsDefault option
- ColorPicker: added Hex block
- ColorPicker: added new palette mode HSVCircle
- ColorPickerRange: DefaultShader replaced with DefaultShaderHorizontal and DefaultShaderVertical
- EasyLayout: reduced memory allocations
- EasyLayout: EasyLayout namespace renamed to EasyLayoutNS to avoid problems with Unity 2018.2 and later
- Interfaces: IItemWidth, IItemHeight, IListViewItemHeight, IListViewItemWidth not used anymore
- ListView: added CenterTheItems property
- ListView: added overridable functions CanBeSelected() and CanBeDeselected()
- ListView: added LoopedList option
- ListView: added Interactable option
- ListView and TileView: ListViewCustomWidth, ListViewCustomHeight, TileViewCustom and TileViewCustomSize replaced with ListViewCustom with List Type option
- ListViewCustomWidth: TItem now does not require IItemWidth implementation
- ListViewCustomHeight: TItem now does not require IItemHeight implementation
- ResizableHeader: fixed resize on touch devices
- Sidebar: added OnOpeningStarted and OnClosingStarted, called when appropriated animation started
- other: prefabs in "Sample Assets" folder replaced with scenes
- other: "Standart Assets" folder renamed to "Scripts"
- other: "Sample Assets" folder renamed to "Examples"
- other: removed ListViewGameObjects prefab
- other: removed outdated prefabs and sprites
are you planning to add animation support for the button? For example, increase when pressed.
This can be done with transitions. For now, I do not see any reason to duplicate this functionality.
I know this is not the right forum to ask this question. But I saw your "transitions" answer and I see a chance to get an answer from an UI expert. In a VR App I saw a UI button and "onGaze" it was expanding into 3D. (From a 2D Button to a kind of 3D Brick) I guess this can be "coded" in some way... But maybe you have an idea or even some additional search terms for a google search? Thanks anyway... Feel free to delete this post if it is to off-topic.
Place 3d object behind the button and animate scale.z to convert it from flat to 3d.
Here sample scene with a script.
Canvas should be with Render Mode = Screen Space - Camera.
Added cube into the button
The scale and the position changed to fit button
And on mouse enter added animation to change scale.z from 0 to a proper value. Same for on mouse exit.
Because it's cube also animated the local position.z to avoid intersections with button after scaling.
Wow - I did not expect such a perfect solution and also such a fast answer ;-)
Thanks 1000 times... I will try this tomorrow - it already sounds very good.
I ve installed the new version : UIWidgets.1.10.0b15-Unity2018.2.4 (i m on 2018.2.12f)
Create a new project
try to compile for windows
you ll get an error message (see picture)
how can i fix that please ?
Open UIWidgets/Scripts/Style/IStyleDefaultValues.cs and replace SetDefaultValues() definifion with following code
/// Sets the default values.