Skip to content

Instantly share code, notes, and snippets.

@Ethan-VisualVocal
Ethan-VisualVocal / ReferenceFinder.cs
Created July 3, 2018 23:51 — forked from ffyhlkain/ReferenceFinder.cs
A reference finder for assets in a #Unity3d project.
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using UnityEditor;
using UnityEngine;
using Debug = UnityEngine.Debug;
using Object = UnityEngine.Object;
namespace XYFoundationEditor.Editor.ReferenceFinder
{
@Ethan-VisualVocal
Ethan-VisualVocal / CustomInspectorCreator.cs
Created June 29, 2018 17:41 — forked from addie-lombardo/CustomInspectorCreator.cs
Editor extension that adds a tool to automagically generate boilerplate custom inspector code~ YES! Just drop it into a folder called 'Editor' and it adds a 'custom inspector' option into the Project window!
using System;
using System.Collections.Generic;
using System.IO;
using System.Reflection;
using System.Text.RegularExpressions;
using UnityEditor;
using UnityEngine;
/// <summary>
/// Generates a boilerplate custom inspector script for Monobehaviours and populates it with its serialized fields.
@Ethan-VisualVocal
Ethan-VisualVocal / ForceLandscape.cs
Last active February 15, 2019 00:28
Workaround for Unity set Screen.orientation bug on iOS 10.
using UnityEngine;
using System.Collections;
// This is used to workaround https://issuetracker.unity3d.com/issues/ios-changing-the-screen-orientation-via-a-script-sometimes-results-in-corrupted-view-on-ios-10
// Bug shows screen in portrait with content rotated 90 offscreen. Caused by explicitly setting Landscape orientation on iOS 10.
//
// On iOS this just switches to LandscapeLeft, back to Portrait, and then back to LandscapeLeft, which seems to work.
// SUGGESTION: blank out the screen before executing this, since the screen jumps around as it switches back and forth.
public class ForceLandscape : MonoBehaviour
{
@Ethan-VisualVocal
Ethan-VisualVocal / XcodeSettingsPostProcesser.cs
Created September 23, 2016 00:03 — forked from sanukin39/XcodeSettingsPostProcesser.cs
Unity XcodeAPI Settings Sample
using System.IO;
using UnityEngine;
using UnityEditor;
using UnityEditor.iOS.Xcode;
using UnityEditor.Callbacks;
using System.Collections;
public class XcodeSettingsPostProcesser
{