Unity Tile Map. How to add scripts etc to Tile Palette tiles - unity3d

Does anyone know how to add scripts etc to the tiles in the tile palette? I want to be able to paint tiles with tags already set and with scripts attached otherwise it is seems pretty much useless.

Create class derived from TileBase like RandomTile.
Instantiate with CreateAssetMenu.
Adjust settings.
Drag from Project to Palette.

Related

How to add a **OUTER POSITIONED** outline to Text Mesh Pro in Unity?

I'm looking to find a way to add an outside positioned outline to TMP in Unity. At the moment what I have right now using the outline property gives me an awkward and ugly center position outline.
First image is what I want to achieve and second is what I have in Unity.
What I want to achieve
What Unity gives me by default using Outline
Please let me know if theres some plugin or way of doing this, thank you.

NGUI can't bring sprite to front in Unity

I have a sprite widget in NGUI, and It can't be brought to front what ever the depth I change in the editor:
Note that the orange panel is a scroll view of NGUI.
Here is the inspector setting of the sprite that I want to set to the very front:
And here is the inspector setting that has overlapped the above sprite that I want to make front of it.
And here is the BottomPanel setting
I finally solve this problem by
Add another panel
Setting the added panel in front the origin one
Make the sprite child of the newly added panel
And the final hierarchy is like this:
And this link of NGUI forum helps
quoted here:
"Depth" property is used to determine the drawing order of the widgets within the same panel that use the same atlas. If you are using different atlases or labels using a dynamic font, bring the widgets forward on the transform's Z, moving them closer to the camera (-Z). If you are using different panels, adjust the transform of the panel you want to bring in front to a lower negative Z value (-Z). I highly recommend sticking to one atlas if you can manage it, it will make your life significantly easier.
And I make a youtube video to explain what I have achieved so far.
Everything looks fine to me but it doesn't seem to work for you. There is another workaround.
On the UIPanel, change the Render Q to Explicit then use z-axis to sort your UISprite. I mean the z position (P) not (R) or (S)
For example, change the z-axis of the "Sprite (1)" object to be 2 then change the z-axis of the "background" object to 1. If this does not work, change the values around.
Please make sure that the Sprite is under the panel.

Black 3D Models - Unity3D

I just recently started using Unity3D, and have imported this object from Sketchfab. When I imported it, it provided all the necessary textures and meshes, but it's all black as shown in the images below. It's the same case for any other object I try to add from the asset store. I've tried to fiddle with the light source, but that doesn't seem to work. Thank you in advance.
Edit: This is what my mesh properties looks like. I have selected "pearl_body" and it's still all black.
You need to expand your model in the Hierarchy(left panel) view untill you will see Mesh Renderer component in the Inspector(right panel). Then you will be able to set the material. Probably you will need replace lambert45G in the material view with BaseTexture.
That should fix the problem.
You can read more about materials here, and about mesh renderers.
I had the same problem and found a solution. Not sure if it will work in your particular case, but here it goes:
I had a model that worked fine in unity until I rigged it, then it looked black. What caused this was that I applied a Smooth modifier after the Skin modifier. I solved it by:
Saving the Skin modifier info by clicking on "Save" at the Advanced tab.
Reset Xform / convert to editable poly / smooth modifier (needed in my case as I forgot to use it when the model was finished, before rigging)
Convert to edit poly again.
Apply skin and load the previously saved skin file.
That's all. Cheers!

How to make an object usable in Unity's Terrain Paint Detail tool?

Currently I have this object, with 1 material in the material folder.
But when I add it to the Paint Detail tool, and try to use it, it doesn't create a single one.
It would be a lot of time to add them to the terrain one by one, so I want to know how can I fix this.
If you want any informations about the files, just comment, thanks :)

how to create dynamic UI that adjust itself to current screen dimensions after loading?

I have created a level editor using new UI system in Unity3D.
Using Level Editor:
I can drag the ui elements,
I am able to save them in scriptable objects
But how could i save and load them at runtime?
I mean, if i create a level with some {width x hight} resolution and if i load it on different resolution, then the whole UI positioning get distorted.
How could i anchor them correctly programmatically?
Any help would be appreciated.
There are good video tutorials about the 4.6.x UI here:
http://unity3d.com/learn/tutorials/modules/beginner/ui.
Especially for positioning the elements I recommend watching: http://unity3d.com/learn/tutorials/modules/beginner/ui/rect-transform.
I suggest you learn how to use the anchor correctly first. If you want to change the position and size of UI element in a script you can do that through the RectTransform component. It offers functions like offsetMax,offsetMin and sizeDelta for position your UI element. The functions you need to use depend on your anchor setting.
as LokiSinclair said. You just need to Adjust the Scale that the new UI provided. It is the four Arrow on the Canvas of each Object and every UI object is inheriting their scale behavior from their Parent.