- Folded box colliders keep unfolding here and there
- No alpha in generated Sprite (circle) when assigned to UI Image
- Never know for sure what version works best with VR and post processing..
- Sprite slicer doesnt work with small sprites (support said wont fix)
- Shadergraph: how to move node with all its connected parent nodes?
- Tried to update oculus package, failed due to dll in use, restarting didnt help, deleted whole oculus folder, alt tab and back, deleted folder appread back! (multiple tiles, until deleted library and some other folder also)
- Cannot drag objects to another folder, if target folder already contains same filename, but there is no info to user that its the case
- More than once a week, sign into unity dialog
- Doing multiselect DeSelect in project window, it jumps to first item on every deselect
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using UnityEditor; | |
public class CopyPasteValues | |
{ | |
const string kBufferName = "json-copy-buffer"; | |
const string kTypeName = "json-copy-type"; | |
[MenuItem("CONTEXT/Component/Copy Values With Json")] | |
static void Copy(MenuCommand command) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEditor; | |
using UnityEngine; | |
namespace PixelWizards.Utilities | |
{ | |
public class EditorNote : MonoBehaviour | |
{ | |
[TextArea] | |
public string m_Text; | |
public Vector3 m_Offset; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <summary> | |
/// Supports drawing properties for lists. | |
/// </summary> | |
/// <typeparam name="TData"></typeparam> | |
abstract class PropertyDrawerExtended<TData> : PropertyDrawer | |
{ | |
Dictionary<string, TData> m_PropertyData = new Dictionary<string, TData>(); | |
TData GetDataForProperty(SerializedProperty property) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class IconExtensions | |
{ | |
/// <summary> | |
/// Create a Icon that calls DestroyIcon() when the Destructor is called. | |
/// Unfortunatly Icon.FromHandle() initializes with the internal Icon-constructor Icon(handle, false), which sets the internal value "ownHandle" to false | |
/// This way because of the false, DestroyIcon() is not called as can be seen here: | |
/// https://referencesource.microsoft.com/#System.Drawing/commonui/System/Drawing/Icon.cs,f2697049dea34e7c,references | |
/// To get arround this we get the constructor internal Icon(IntPtr handle, bool takeOwnership) from Icon through reflection and initialize that way | |
/// </summary> | |
private static Icon BitmapToIcon(Bitmap bitmap) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Debug.Log("<color=#" + ColorUtility.ToHtmlStringRGB(col) + ">████████████</color> = " + col); |
Unity shows the following warning on mobile devices up to Unity 2019.4: "Please note that Unity WebGL is not currently supported on mobiles. Press OK if you wish to continue anyway." This script helps you remove this warning
To see live examples see Unity Web GL Loading Test
The script will run after the build has completed and replace the checks from all generated javascript files.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
// Moves Camera similar to how camera is moved in the Unity view port. Drop the scrip on the game object which has the camera and you wish to move. | |
public class SmoothGameCameraMovement : MonoBehaviour | |
{ | |
public float lateralSpeed = 0.0015f; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections; | |
using UnityEngine; | |
/// <summary> | |
/// GC friendly coroutine utilities | |
/// @JfranMora #UnityTips | |
/// </summary> | |
public static class CoroutineUtils | |
{ | |
public static IEnumerator WaitForSeconds(float seconds) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEditor; | |
using UnityEngine; | |
using UnityEngine.UIElements; | |
public class HideSceneToolbar | |
{ | |
[MenuItem("Test/Hide the scene toolbar")] | |
static void Hide() | |
{ | |
var sceneViews = Resources.FindObjectsOfTypeAll<SceneView>(); |