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.IO; | |
using System; | |
using System.Text; | |
public class SimpleCSVDebug | |
{ | |
string GetPathFile() | |
{ | |
string path = Environment.GetFolderPath(Environment.SpecialFolder.Desktop); | |
string file = "output.csv"; |
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 UnityEngine; | |
using UnityEditor; | |
using UnityEditor.AnimatedValues; | |
[CustomEditor(typeof(Transform))] | |
[CanEditMultipleObjects] | |
public class MyTransformComponent : Editor | |
{ | |
private Transform _transform; | |
private AnimBool m_showExtraFields; |
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
// First we need an enum for a dropdown to select what to align to (first or last selected). | |
public AlignToType alignTo = AlignToType.lastSelected; | |
// We also need an enum to flag what axes we want to align on. | |
public AxisFlag alignmentAxis; | |
// This method will display the Alignment options and execution button. | |
private void AlignmentInspector() | |
{ | |
// Start off with a nice bold label to help section off the area. |
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 enum AlignToType { lastSelected, firstSelected } | |
public enum AxisFlag { X = 1, Y = 2, Z = 4 } |
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 UnityEngine; | |
using UnityEditor; | |
// This custom Inspector just shows the default inspector and | |
// then, at the correct time, destroys the component if it has | |
// been flagged for destruction. | |
[CustomEditor(typeof(ShowLocalAxis))] | |
public class ShowLocalAxisInspector : Editor | |
{ | |
public override void OnInspectorGUI() |
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 UnityEngine; | |
// Displays lines for the Local Axis of a game object evenwhen the object is not selected. | |
public class ShowLocalAxis : MonoBehaviour | |
{ | |
// This is used by the CustomTransformComponent class | |
// and the custom inspector for this class so that we can tag the script component | |
// for deletion at the proper time. We're hiding it in the inspector since it shouldn't | |
// be modified by the user, but needs to be publically accessible by other classes. | |
[HideInInspector] |
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
// This method allows us to add a ShowLocalAxis component to the currently selected transform. | |
// We'll be using a toggle box to add or remove the component. This bool holds that state. | |
private bool showLoxalAxisToggle = false; | |
// This holds a reference to the ShowLocalAxis component. | |
private ShowLocalAxis showLocalAxis; | |
private void ShowLocalAxisComponentToggle() | |
{ | |
// First we check to see if there is a ShowLocalAxis component on this game object. | |
showLocalAxis = _transform.gameObject.GetComponent<ShowLocalAxis>(); |
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 UnityEngine; | |
using UnityEditor; // Required for any editor functions | |
using UnityEditor.AnimatedValues; // Required for fade out groups | |
[CustomEditor(typeof(Transform))] // This makes it override the standard inspector for Transforms | |
[CanEditMultipleObjects] // This allows us to select mutiple components and edit them simultaneously | |
// Inherits from Editor class so we can override OnInspectorGUI() | |
// Also note that Editor scripts should always be placed in an "Editor" folder. | |
public class MyTransformComponent : Editor |
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
#original script by Nikolaus Gradwohl 2012-05-21T05:08:35+02:00 | |
#http://www.local-guru.net/blog/2012/5/21/blender-labyrinth-generator | |
from random import shuffle | |
from array import * | |
import bpy | |
def GetName( cnt ): | |
if (cnt < 100 and cnt > 9): | |
return 'm0' + str(cnt) |
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 UnityEngine; | |
/// <summary> | |
/// Replacement for Unity's debug so we can just shut it off for production | |
/// </summary> | |
public class NGDebug | |
{ | |
private enum WarningLevel | |
{ all, warning, error, none } |