This file contains 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
/* LICENSE | |
Copyright (c) 2019 Adrian Babilinski | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is | |
furnished to do so, subject to the following conditions: |
This file contains 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.Linq; | |
using UnityEngine; | |
/// <summary> | |
/// Abstract class for making reload-proof singletons out of ScriptableObjects | |
/// Returns the asset created on editor, null if there is none | |
/// Based on https://www.youtube.com/watch?v=VBA1QCoEAX4 | |
/// </summary> | |
/// <typeparam name="T">Type of the singleton</typeparam> |
This file contains 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
#if UNITY_EDITOR | |
using UnityEditor; | |
using UnityEngine; | |
public static class EditorGuiUtility | |
{ | |
public static void DrawUILine(Color color, int thickness = 2, int padding = 10) | |
{ | |
Rect r = EditorGUILayout.GetControlRect(GUILayout.Height(padding+thickness)); |
This file contains 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
/* LICENSE | |
Copyright (c) 2021 Adrian Babilinski | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is | |
furnished to do so, subject to the following conditions: | |
The above copyright notice and this permission notice shall be included in all | |
copies or substantial portions of the Software. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
//Shader to rotate an image from a Unity WebCameraTexture. | |
Shader "Custom/Web Camera Shader" | |
{ | |
Properties | |
{ | |
_MainTex ( "Main Texture", 2D ) = "white" {} | |
_RotationDegrees ( "Rotation Degrees", Float) = 0 | |
} | |