Simple way to control wall hits and not falling from cliffs on Unity's Terrain (heightmap). You can disable collisions between character and terrain and used the code in the pic
#نکته #یونیتی
👉 @UnityEngine3D 👈
#نکته #یونیتی
👉 @UnityEngine3D 👈
You can use [𝗧𝗲𝘅𝘁𝗔𝗿𝗲𝗮] attribute to make your string input field larger in the inspector
https://docs.unity3d.com/ScriptReference/TextAreaAttribute.html
#نکته #یونیتی
👉 @UnityEngine3D 👈
https://docs.unity3d.com/ScriptReference/TextAreaAttribute.html
#نکته #یونیتی
👉 @UnityEngine3D 👈
This media is not supported in your browser
VIEW IN TELEGRAM
If you would like to change a shader property via scripting like this:
material.SetFloat("_Glossiness", 0.5f);
You can get the string by selecting gear wheel of the shader component & click on "Select Shader" to see a list of exposed properties.
#نکته #یونیتی
👉 @UnityEngine3D 👈
material.SetFloat("_Glossiness", 0.5f);
You can get the string by selecting gear wheel of the shader component & click on "Select Shader" to see a list of exposed properties.
#نکته #یونیتی
👉 @UnityEngine3D 👈
When you destroy an AudioSource, the AudioClip will not be unloaded from the memory. You can use UnloadAudioData to do so. This works only for AudioClips that are based on actual sound file assets
#نکته #یونیتی
👉 @UnityEngine3D 👈
#نکته #یونیتی
👉 @UnityEngine3D 👈
👍5
You can access the child objects of a parent object with a 𝗳𝗼𝗿𝗲𝗮𝗰𝗵 𝗹𝗼𝗼𝗽 using 𝗽𝗮𝗿𝗲𝗻𝘁 𝘁𝗿𝗮𝗻𝘀𝗳𝗼𝗿𝗺 as a collection reference
It works because 𝗧𝗿𝗮𝗻𝘀𝗳𝗼𝗿𝗺 component implements IEnumerable interface
#نکته #یونیتی
👉 @UnityEngine3D 👈
It works because 𝗧𝗿𝗮𝗻𝘀𝗳𝗼𝗿𝗺 component implements IEnumerable interface
#نکته #یونیتی
👉 @UnityEngine3D 👈
👍2👏1
This media is not supported in your browser
VIEW IN TELEGRAM
If the cinemachine camera frustum gets in the way of your lighting work and you can't find the Gizmo to turn it off just collapse the Cinemachine Brain Component and it will disappear
#نکته #یونیتی
👉 @UnityEngine3D 👈
#نکته #یونیتی
👉 @UnityEngine3D 👈
👍1
This media is not supported in your browser
VIEW IN TELEGRAM
did you know that you can add animation callbacks when an animation started and ended without adding events to every single animation?
just add this code to your animator controller animation :
#نکته #یونیتی
👉 @UnityEngine3D 👈
just add this code to your animator controller animation :
#نکته #یونیتی
👉 @UnityEngine3D 👈
👍1🔥1
Having too many objects in the Hierarchy can be confusing. Luckily, there is an easy way to expand & collapse objects.
Highlight the parent you wish to expand/collapse and press the arrow left or right key, for example Alt + right or Alt + left
#نکته #یونیتی
👉 @UnityEngine3D 👈
Highlight the parent you wish to expand/collapse and press the arrow left or right key, for example Alt + right or Alt + left
#نکته #یونیتی
👉 @UnityEngine3D 👈
👍5
Begin writing your statement in Visual Studio and then press tab twice to autocomplete the rest of your statement. This is incredibly helpful at reducing writing time and understanding the statement.
#نکته #یونیتی
👉 @UnityEngine3D 👈
#نکته #یونیتی
👉 @UnityEngine3D 👈