en
Feedback

Don't get caught by a cheater! Telemetrio finds and tags such channels 👉 If you want to see the tag, subscribe

کانال تخصصی یونیتی ( آموزش و نکته )

کانال تخصصی یونیتی ( آموزش و نکته )

Open in Telegram

به نام خدا مسئولیت مطالب یا آگهی ارسالی در کانال یا کامنت ها به عهده من یا ما نیست لیست گروه ها و... https://t.me/UnityEngine3D/823 برای تبلیغ در کانال و گروه : https://t.me/UnityEngine3DAds مدیر اصلی(مالک) @UnityEngine

Show more
1 789
Subscribers
-224 hours
-27 days
+530 days
Posts Archive
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 👈

Use the FormerlySerializedAs attribute if you need to change a property on a MonoBehaviour but don't want to lose existing values. #نکته #یونیتی 👉 @UnityEngine3D 👈

Implement OnValidate() to limit the range of values your properties accept in the inspector

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 👈

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 👈

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 👈

Use Debug.DrawRay and Debug.DrawLine methods to visually debug raycasts, trigger boxes and other elements in your game #نکته #یونیتی 👉 @UnityEngine3D 👈

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 👈

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 👈

Use the ExecuteInEditMode attribute on your MonoBehaviour if you want any code to run while in edit mode, in addition to play mode. Update is only called when something changes in the scene #نکته #یونیتی 👉 @UnityEngine3D 👈

Use the Ctrl key to snap game objects in your scene to the grid. Change snap units in Edit / Grid and Snap Settings. You can also toggle Grid Snapping when in Global handle rotation mode #نکته #یونیتی 👉 @UnityEngine3D 👈

Did you know that you can have multiple scenes open in the Unity editor? Just drag your additional scenes into the hierarchy. Only one scene can be active. An easy way to compare scenes. #نکته #یونیتی 👉 @UnityEngine3D 👈

Setting Time.timeScale to 0 is an easy way to pause your game, but make sure your UI code doesn't rely on Time.deltaTime or W
Setting Time.timeScale to 0 is an easy way to pause your game, but make sure your UI code doesn't rely on Time.deltaTime or WaitForSeconds(). Use Time.unscaledDeltaTime to avoid this issue #نکته #یونیتی 👉 @UnityEngine3D 👈

The MenuItem attribute can also be used to create a menu hierarchy and assign a key shortcut for your editor tools. % = Ctrl;
The MenuItem attribute can also be used to create a menu hierarchy and assign a key shortcut for your editor tools. % = Ctrl; # = Shift; & = Alt; _ = no modifier. See https://docs.unity3d.com/ScriptReference/MenuItem.html #نکته #یونیتی 👉 @UnityEngine3D 👈