GUIStyle mystyle = new GUIStyle("some string from the list below");
- "CN Box"
- "Button"
| // Drop into Assets/Editor, use "Tools/Regenerate asset GUIDs" | |
| using System; | |
| using System.Collections.Generic; | |
| using System.Diagnostics; | |
| using System.IO; | |
| using UnityEditor; | |
| namespace UnityGuidRegenerator { | |
| public class UnityGuidRegeneratorMenu { |
Some code allocates memory when running in the editor and not on the device. This is due to Unity doing some extra error handling so possible error messages can be output in the console. Much of this code is stripped during build. It's therefore important to profile on device, and do it regularly.
Optimizations often makes code more rigid and harder to reason. Don't do it until you really need to.
When profiling, wrap methods or portions of a method in Profiler.BeginSample(string name) and Profiler.EndSample() to make them easier to find in the profiler.
public class SomeClass {| using System; | |
| using UnityEngine; | |
| /// <summary> | |
| /// Find 関数の処理速度を計測するスクリプト | |
| /// </summary> | |
| public sealed class FindTest : MonoBehaviour | |
| { | |
| public int LoopCount = 1000; // 1 回のテストで Find 関数を実行する回数 | |
| public int TestCount = 10; // テストの回数 |
| using UnityEditor; | |
| using UnityEngine; | |
| using UnityObject = UnityEngine.Object; | |
| namespace Ludiq | |
| { | |
| public static class UndoUtility | |
| { | |
| private static void RecordObject(UnityObject uo, string name) | |
| { |
| /******************************************************************************* | |
| * Don't Be a Jerk: The Open Source Software License. | |
| * Adapted from: https://github.com/evantahler/Dont-be-a-Jerk | |
| ******************************************************************************* | |
| * _I_ am the software author - JohannesMP on Github. | |
| * _You_ are the user of this software. You might be a _we_, and that's OK! | |
| * | |
| * This is free, open source software. I will never charge you to use, | |
| * license, or obtain this software. Doing so would make me a jerk. | |
| * |
| // NOTE DONT put in an editor folder! | |
| using UnityEngine; | |
| public class AutohookAttribute : PropertyAttribute | |
| { | |
| } |
Here is a short guide that will help you setup your environment to create signed commits or signed tags with Git locally. This has been extensively tested on Windows with Git and the Github Desktop application: I use it every day for my professional development projects.
I you face any issue, feel free to leave a comment below.
| using System; | |
| using System.Collections.Generic; | |
| using System.ComponentModel; | |
| using System.IO; | |
| using System.Linq; | |
| using Newtonsoft.Json; | |
| using Newtonsoft.Json.Linq; | |
| using Sirenix.OdinInspector; |