کانال تخصصی یونیتی ( آموزش و نکته )
1.63K subscribers
547 photos
145 videos
51 files
247 links
به نام خدا

مسئولیت مطالب یا آگهی ارسالی در کانال یا کامنت ها به عهده من یا ما نیست

لیست گروه ها و...
https://t.me/UnityEngine3D/823

برای تبلیغ در کانال و گروه :
https://t.me/UnityEngine3DAds

مدیر اصلی(مالک)
@UnityEngine
Download Telegram
The Transform class implements IEnumerable. With that you could i.e.:

-Iterate through the children of the transform like foreach (Transform child in transform) {...}

-Iterate with direct cast via .OfType<T> like transform.OfType<RectTransform>()


🔗 Binary Impact


#نکته #یونیتی


👉 @UnityEngine3D 👈
👍1
This media is not supported in your browser
VIEW IN TELEGRAM
Here is how to set up One Way collision Platforms in Unity 2D using Platform Effector component



🔗 Sunny Valley Studio


#نکته #یونیتی


👉 @UnityEngine3D 👈
👍111
Normalizing a zero vector is mathematically undefined and returning NaN within the Unity.Mathematics lib!

When normalizing i.e. a Unity.​Mathematics float3 use the normalizesafe method to avoid NaN.

It works for Vector3 though!


🔗 Binary Impact


#نکته #یونیتی


👉 @UnityEngine3D 👈
1👍1👏1
need of Icons for your project?

You can download many Icons in a single Font: https://github.com/google/material-design-icons/tree/master/variablefont

Then use it with TMP!

- Create a FontAsset
- Assign the Font to the TextElement
- Add codePoint
- On Google Fonts Site search for icons + codePoints




🔗 Binary Impact



#نکته #یونیتی


👉 @UnityEngine3D 👈
👍1
This media is not supported in your browser
VIEW IN TELEGRAM
Ragdolls are perfect for dynamic Death Effects or impactful reactions for your characters

🔗 Sunny Valley Studio


#نکته #یونیتی


👉 @UnityEngine3D 👈
👍62
Here are some different approaches to check a collection for its length.

Some examples might better fit your coding style than others. Always use the ones that fit your team and give you the maximum readability.



🔗 Binary Impact


#نکته #یونیتی


👉 @UnityEngine3D 👈
👍3👎2
This media is not supported in your browser
VIEW IN TELEGRAM
Make your Character stand out in Dark Scenes with Lighting and Rendering Layers in Unity!

🔗 Sunny Valley Studio


#نکته #یونیتی


👉 @UnityEngine3D 👈
👍9🔥1
This media is not supported in your browser
VIEW IN TELEGRAM
To inspect your map more easily in the Scene View use Shift+~ to toggle off all tool overlays

🔗 Sunny Valley Studio


#نکته #یونیتی


👉 @UnityEngine3D 👈
👍3
This media is not supported in your browser
VIEW IN TELEGRAM
Quickly Organize your Hierarchy!

Use Ctrl+Shift+G to group selected GameObjects under a new Parent Object

🔗 Sunny Valley Studio


#نکته #یونیتی


👉 @UnityEngine3D 👈
👍7👌2
با این پروژه میتونید کد یونیتی رو برای PS2 خروجی بگیرید

https://github.com/distrohelena/ps2unity

خواستید یه نگاه بهش بندازید

Features:

- 3D Models
- Camera
- Lights
- Tesselation: Big triangles on the PS2 get easily culled, so we can tesselate to make them smaller.
- Lightmaps: We extract the lightmaps, and convert from HDR to SDR with a specific exposure.
- Code Conversion: C# to C++ code conversion (very rudimentary, but does work). Requires manually building the output code inside the ps2engine project.
- DirectX Windows version: Debug on Windows, the C++ version of the engine is cross-platform, and just loads different renderers based on the platform.
🔥5
Add this code to your Editor folder and it will save your scene everytime you press play!
حداقل اگه برق رفت مشکلی پیش نیاد

using UnityEngine;
using UnityEditor;
using UnityEditor.SceneManagement;

[InitializeOnLoad]
public class AutoSaveOnRunMenuItem
{
public const string MenuName = "Tools/Autosave On Run";
private static bool isToggled;

static AutoSaveOnRunMenuItem()
{
EditorApplication.delayCall += () =>
{
isToggled = EditorPrefs.GetBool(MenuName, false);
UnityEditor.Menu.SetChecked(MenuName, isToggled);
SetMode();
};
}

[MenuItem(MenuName)]
private static void ToggleMode()
{
isToggled = !isToggled;
UnityEditor.Menu.SetChecked(MenuName, isToggled);
EditorPrefs.SetBool(MenuName, isToggled);
SetMode();
}

private static void SetMode()
{
if(isToggled)
{
EditorApplication.playModeStateChanged += AutoSaveOnRun;
}
else
{
EditorApplication.playModeStateChanged -= AutoSaveOnRun;
}
}

private static void AutoSaveOnRun(PlayModeStateChange state)
{
if (EditorApplication.isPlayingOrWillChangePlaymode && !EditorApplication.isPlaying)
{
Debug.Log("Auto-Saving before entering Play mode");

EditorSceneManager.SaveOpenScenes();
AssetDatabase.SaveAssets();
}
}
}




#نکته #یونیتی


👉 @UnityEngine3D 👈
12👍5🔥3
The new Input System requires an Input Action Map?
Not true! You can still handle inputs in one line!

Old:
if (Input.GetKeyDown(Keycode. Space) Jump();
Current:
if (Keyboard.current.spaceKey.wasPressedThisFrame) Jump();


Source

#نکته #یونیتی


👉 @UnityEngine3D 👈
8👍3😁1
Normally Camera skips rendering of objects further away than farClipPlane. You can set up some Layers to use smaller culling distances using layerCullDistances.

When assigning, assign float array that has 32 values. Zero values mean "use far plane distance".

🔗 Binary Impact (@BinaryImpactG)


#نکته #یونیتی


👉 @UnityEngine3D 👈
2🤔2
This media is not supported in your browser
VIEW IN TELEGRAM
Project Auditor package in Unity 6.1 can identify performance bottlenecks in your project and help you optimize them with just a few clicks ⚡️🔨



🔗 Sunny Valley Studio (@SunnyVStudio)


#نکته #یونیتی


👉 @UnityEngine3D 👈
3
Did you know that in Unity 6 you can assign default references to your PropertyDrawers!



🔗 Karl Jones (@KarlJamesJones)



#نکته #یونیتی


👉 @UnityEngine3D 👈
👍1
Ever wondered how to render only the shadow of a mesh? No need for a specialized shader, just set the Lighting in the Mesh Renderer to Shadows only.



🔗 Binary Impact (@BinaryImpactG)


#نکته #یونیتی


👉 @UnityEngine3D 👈
Did you know that TextMeshPro Input fields offer a kind of input validation?

You can select it in the inspector and the documentation explains the options in detail.


🔗 Binary Impact (@BinaryImpactG)



#نکته #یونیتی


👉 @UnityEngine3D 👈
1👍1