You can easily customize the mouse cursor in your game by calling Cursor.SetCursor, using a texture of your choice. KenneyNL has a great free set of crosshairs https://kenney.nl/assets/crosshair-pack
#نکته #یونیتی
👉 @UnityEngine3D 👈
#نکته #یونیتی
👉 @UnityEngine3D 👈
kenney.nl
Crosshair Pack · Kenney
Download this package (200 assets) for free, CC0 licensed!
👍1
Use the DisallowMultipleComponent attribute to prevent multiple instances of the same component being attached. You can then call GetComponent without having to worry if more than one component is attached
#نکته #یونیتی
👉 @UnityEngine3D 👈
#نکته #یونیتی
👉 @UnityEngine3D 👈
👍1
Use Debug.DrawRay and Debug.DrawLine methods to visually debug raycasts, trigger boxes and other elements in your game
#نکته #یونیتی
👉 @UnityEngine3D 👈
#نکته #یونیتی
👉 @UnityEngine3D 👈
👍5👎1
Accidentally change component values during play mode? Click the drop-down menu (top-right of the component) and click Copy Component. Then, click Paste Component Values once you're back in editor mode
#نکته #یونیتی
👉 @UnityEngine3D 👈
#نکته #یونیتی
👉 @UnityEngine3D 👈
👍4👎1
Use StringBuilder when performing a lot (>3) of string concatenation. Strings are immutable and concatenation results in copies. String interpolation can also be faster than String.Format
#نکته #یونیتی
👉 @UnityEngine3D 👈
#نکته #یونیتی
👉 @UnityEngine3D 👈
👍2
You can adjust stack trace logging at runtime. E.g. call Application.SetStackTraceLogType(LogType.Log, StackTraceLogType.None) and Debug.Log will not output the stack trace
#نکته #یونیتی
👉 @UnityEngine3D 👈
#نکته #یونیتی
👉 @UnityEngine3D 👈
👍2
Implement OnValidate() to limit the range of values your properties accept in the inspector
#نکته #یونیتی
👉 @UnityEngine3D 👈
#نکته #یونیتی
👉 @UnityEngine3D 👈
🔥1
Use the FormerlySerializedAs attribute if you need to change a property on a MonoBehaviour but don't want to lose existing values.
#نکته #یونیتی
👉 @UnityEngine3D 👈
#نکته #یونیتی
👉 @UnityEngine3D 👈
👍2
Love C# events in Unity? Initialize them to avoid null-checking when you invoke them, e.g.:
public static event Action<float> OnHealthChanged = (health) => { };
...
OnHealthChanged(currentHealth/maxHealth);
#نکته #یونیتی
👉 @UnityEngine3D 👈
public static event Action<float> OnHealthChanged = (health) => { };
...
OnHealthChanged(currentHealth/maxHealth);
#نکته #یونیتی
👉 @UnityEngine3D 👈
👍3
Use the C# 7 [field: SerializeField] attribute to see a property backing field in the Unity inspector.
[field: SerializeField]
public bool Repeat { get; set; }
#نکته #یونیتی
👉 @UnityEngine3D 👈
[field: SerializeField]
public bool Repeat { get; set; }
#نکته #یونیتی
👉 @UnityEngine3D 👈
🔥3
This media is not supported in your browser
VIEW IN TELEGRAM
You can use 𝗖𝗼𝗹𝗹𝗱𝗶𝗲𝗿𝟮𝗗.𝗖𝗮𝘀𝘁(..) / Rigidbody2D.Cast(...) 𝘁𝗼 𝗱𝗲𝘁𝗲𝗰𝘁 𝗰𝗼𝗹𝗹𝗶𝘀𝗶𝗼𝗻 when creating custom movement system for your game
Great live training video about it: https://youtu.be/wGI2e3Dzk_w
#نکته #یونیتی
👉 @UnityEngine3D 👈
Great live training video about it: https://youtu.be/wGI2e3Dzk_w
#نکته #یونیتی
👉 @UnityEngine3D 👈
🔥2👍1
This media is not supported in your browser
VIEW IN TELEGRAM
You can 𝗮𝗱𝗱 𝗕𝘂𝗹𝗹𝗲𝘁 𝗛𝗼𝗹𝗲𝘀 or 𝗦𝘁𝗶𝗰𝗸𝗲𝗿𝘀 to your game by using 𝗗𝗲𝗰𝗮𝗹 𝗥𝗲𝗻𝗱𝗲𝗿𝗲𝗿 𝗙𝗲𝗮𝘁𝘂𝗿𝗲 in a URP project!
Here is detailed explanation:
https://www.sunnyvalleystudio.com/blog/unity-decal-bullet-holes-stickers
#نکته #یونیتی
👉 @UnityEngine3D 👈
Here is detailed explanation:
https://www.sunnyvalleystudio.com/blog/unity-decal-bullet-holes-stickers
#نکته #یونیتی
👉 @UnityEngine3D 👈
👍2🔥2🥰1
Brighten up your Debug.Log output with some rich text! Unity supports "b", "i", "color" and "size" markup tags in your text. I use extension methods to simplify usage
#نکته #یونیتی
👉 @UnityEngine3D 👈
#نکته #یونیتی
👉 @UnityEngine3D 👈
🔥5👍2
Playing your scene in the #unity3d editor, but forgot to select "Maximize On Play", e.g.? No need to restart! You can pause, change settings and hit play. Use Ctrl+P to play, Ctrl+Shift+P to pause, and Ctrl+P during play mode to stop
#نکته #یونیتی
👉 @UnityEngine3D 👈
#نکته #یونیتی
👉 @UnityEngine3D 👈
🔥1
Use the SelectionBase attribute if your game object has children. This makes it easier to select in the scene view
#نکته #یونیتی
👉 @UnityEngine3D 👈
#نکته #یونیتی
👉 @UnityEngine3D 👈
👍2🔥1
Use ProfilerMarker to mark up script code blocks for the Profiler.
The information is then displayed in the CPU Profiler & can be also captured with Recorder.
This helps to get performance overview of different parts of code and identify issues.
#نکته #یونیتی
👉 @UnityEngine3D 👈
The information is then displayed in the CPU Profiler & can be also captured with Recorder.
This helps to get performance overview of different parts of code and identify issues.
#نکته #یونیتی
👉 @UnityEngine3D 👈
👍4
Mix different math expressions, along with 'L' (linear) and 'R' (random), in the Unity inspector transform fields to come up with interesting object placement patterns. https://docs.unity3d.com/Manual/EditingValueProperties.html
#نکته #یونیتی
👉 @UnityEngine3D 👈
#نکته #یونیتی
👉 @UnityEngine3D 👈
😁4🤩2
راهنمای آموزش نصب یونیتی :
یونیتی را نصب کنید
❌ کپی از این آموزش پیگرد قانونی دارد ❌
یونیتی را نصب کنید
❌ کپی از این آموزش پیگرد قانونی دارد ❌
😁18🤯16😐6👍2👎1👏1