Browsing articles in "tips"
Oct
17
2021

Use custom Editor fonts

Go to Unity installation folder,Start notepad as an Administrator,then edit file: \Editor\Data\Resources\fontsettings.txt Add your custom fonts there:

Feb
4
2021

You are trying to replace or create a Prefab from the instance ‘…’ that references a missing script. This is not allowed. Please change the script or remove it from the GameObject.

Solution:– Open the prefab that it mentions in the error, then check for missing script and remove it.– It doesn’t help if you remove missing script in the scene from that prefab, or even if you unpack that prefab, need to remove it from the […]

Feb
18
2020

Debug.Log: Show actual color from Color variable

Had to debug what color is the script returning for mouse pixel position, but printing out the value didn’t really help:Debug.Log(col);Since the output is like this (you don’t know whats the actual color)RGBA(0,349, 0,204, 0,416, 0,000) Enter Debug.Log with <color></color> and utf8 block:Debug.Log(“<color=#”+ColorUtility.ToHtmlStringRGB(col)+”>██████████</color> = “+col); […]

Dec
13
2018

Adding Multiple Submit Keys to Input Manager

Had to make an UI button clickable by multiple different keyboard keys (like enter, space, left/right shift etc.) And almost started writing custom script to handle extra keys when selecting UI button.. but then realized that you can duplicate Input Manager keys, and sure enough […]

Nov
20
2018

Use adb logcat with Colors

Had problems finding some Debug.LogError messages in the android logcat output, so googled around and sure enough you can enable output colors easily! Just add -v color parameter: adb logcat -s Unity ActivityManager PackageManager dalvikvm DEBUG -v color Note: Default windows Command Prompt doesn’t support […]

Aug
7
2018

Faster Debug.Log

Debug.Log() slows down your editor or even hangs if it happens to run inside some long loop, but you can make it faster by disabling stacktrace from Debug.Log()! (see image above) Tested for-loop with 100000 iterations in editor (Unity 2018.1.6f1) – 25000ms with stacktrace enabled […]

Apr
5
2018

Upgrading old 5.5 project to 2017.4 LTS

So had to upgrade one old Android+iOS cardboard app into newer unity version.. (Due to old unity doesn’t support latest apple os updates [link], missing new app store image sizes [link], some plugins are getting fixes/updates to newer versions, Android google play has new requirements […]

Oct
21
2016

How to enable unsafe keyword for Unity C#

Enabling “unsafe” for unity c# is quite simple: – Add these 2 files to your project folder (inside Assets/ folder root) – “smcs.rsp” and “gmcs.rsp” – both files contain only 1 line of text: -unsafe – Then restart Unity and VisualStudio/Monodev *Note: Unity 5.5 wants […]

Oct
16
2016

[Script] Display Version Number in UI Text

Small script for displaying current app version number from Player Settings in UI Text component. *seems to work in Android, not ios..?   Source: (Attach to UI Text component) https://github.com/UnityCommunity/UnityLibrary/blob/master/Scripts/Helpers/Version/GetVersion.cs

Sep
28
2016

Add Custom Explorer Context Menu Item for Opening a Folder as Project with Unity

You can add custom context menu items into Windows Explorer (more info), so you can create custom menu item that opens the current folder as a project in Unity. (it will still warn you about project version if its different) Example RegEdit file: *Note! you […]

Pages:12»

Connect

Twitter View LinkedIn profile Youtube Github Join Discord Twitch Instagram BlueSky

UnityLauncherPro

Get UnityLauncherPRO and work faster with Unity Projects!
*free unity hub alternative

@unitycoder_com

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.