- Select the original Texture (not the GameObject).
- Change
Texture Type
toSprite (2D and UI)
. - Change
Wrap Mode
toRepeat
. - Click
Apply
. - Create a
Quad
object:GameObject -> 3D Object ->Quad
. - Scale the
Quad
to the size you want. - Create a light:
GameObject->Light->Directional Light
. - Adjust the light intensity to whatever you like.
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 UnityEditor; | |
using UnityEngine; | |
/// <summary> | |
/// Folder organizer editor window. | |
/// http://diegogiacomelli.com.br/using-an-assetpostprocessor-editorwindow-to-keep-assets-organized-on-unity-projects | |
/// </summary> | |
public class FolderOrganizerEditorWindow : EditorWindow | |
{ | |
FolderOrganizerSettings _settings; |
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
// put me in an Editor folder | |
using System.IO; | |
using UnityEditor; | |
using UnityEditorInternal; | |
using UnityEngine; | |
public static class LayoutUtils | |
{ | |
// unity stores layouts in a path referenced in WindowLayout.LayoutsPreferencesPath. | |
// Unfortunately, thats internal - well just creat the path in the same way they do! |
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
// NOTE DONT put in an editor folder! | |
using UnityEngine; | |
public class AutohookAttribute : PropertyAttribute | |
{ | |
} |
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; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Reflection; | |
using UnityEngine; | |
public class BaseBehaviour : MonoBehaviour | |
{ | |
protected virtual void OnEnable() | |
{ |
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
namespace JamesFrowen | |
{ | |
public interface ISomeInterface | |
{ | |
void SomeMethod(); | |
} | |
[System.Serializable] | |
public class SomeInterfaceWrapper : InterfaceWrapper<ISomeInterface> | |
{ |
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 UnityEngine; | |
using UnityEditor; | |
using System; | |
public enum WindowType | |
{ | |
Game, | |
Scene, | |
Hierarchy, | |
Console, |
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; | |
using System.Collections.Generic; | |
using System.Reflection; | |
using UnityEditor; | |
public static class GetUnityTypes | |
{ | |
public static List<Type> GetEditorWindowTypes() | |
{ | |
var result = GetSubClassTypes<EditorWindow>(); |
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
## Photon Methods | |
**public class Blank : Photon.PunBehaviour** | |
instead of mono behavior, use this to receive photon callbacks in your script. | |
**public override void OnLeftRoom()** | |
An example of overriding a punbehavior callback |
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
// Not support of 2019.1.0f1 | |
static void CreateScriptAsset(string templatePath, string destName) { | |
#if UNITY_2019_1_OR_NEWER | |
UnityEditor.ProjectWindowUtil.CreateScriptAssetFromTemplateFile(templatePath, destName); | |
#else | |
typeof(UnityEditor.ProjectWindowUtil) | |
.GetMethod("CreateScriptAsset", System.Reflection.BindingFlags.Static | System.Reflection.BindingFlags.NonPublic) | |
.Invoke(null, new object[] { templatePath, destName }); | |
#endif |