Skip to content

Instantly share code, notes, and snippets.

using System;
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using UnityEditor;
public class GizmoRendererAttribute : System.Attribute
{
@adamgit
adamgit / PackageSettings.cs
Created February 14, 2022 16:08
A generic solution for storing and retrieving per-Project settings in Unity seamlessly whether in a Package, a Project, or a DLL.
using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using UnityEditor.Compilation;
using UnityEngine;
using Assembly = System.Reflection.Assembly;
public class PackageSettings : ScriptableObject
@adamgit
adamgit / UnityTweakGUI.cs
Last active June 10, 2016 21:21 — forked from Danik/UnityTweakGUI.cs
A simple in-game parameter tweaking script for Unity. It finds all fields and properties marked with [TweakableMember] in MonoBehaviours in a scene, and enables tweaking in a GUI from inside the game, which can be useful on tablets etc, where there is no access to the inspector.
using UnityEngine;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Reflection;
///<summary>
/// A simple in-game GUI for Unity that allows tweaking of script fields
/// and properties marked with [TweakableMember]
///</summary>
public interface MBExecutableAlgorithm<T>
{
public void execute( T dataSet );
}
import tmachine.batchprocessors.MBExecutableAlgorithm;
import java.text.DecimalFormat;
import java.util.LinkedList;
import java.util.List;
import java.util.function.Consumer;
import java.util.function.Function;
/**
* Created by adam on 29/03/16.
import java.awt.geom.Rectangle2D;
import java.util.ArrayList;
import java.util.List;
import java.util.function.Consumer;
import java.util.function.Function;
public class ProcPhysicsSetVelocities
{
@adamgit
adamgit / gist:42253d7bb9320bbb49bf
Last active August 29, 2015 14:16
Unity3d: track a variable live in your GUI using drag/drop and Inspector (don't write a pointless class every time you need this)
using UnityEngine;
using System.Collections;
using UnityEngine.UI;
using System.Reflection;
/**
License: do whatever you want.
Questions etc: @t_machine_org
*/
@adamgit
adamgit / gist:3839993
Created October 5, 2012 14:11
VCLoadApplication method swizzle
@implementation UIView (swizzled)
-(void) swizzledSetNeedsDisplay
{
//if( _currentFrame != _lastDrawnFrame )
{
//[super setNeedsDisplay];
}
}
@end
@adamgit
adamgit / .gitignore
Last active April 8, 2024 12:58
.gitignore file for Xcode4 / OS X Source projects
#########################
# .gitignore file for Xcode4 and Xcode5 Source projects
#
# Apple bugs, waiting for Apple to fix/respond:
#
# 15564624 - what does the xccheckout file in Xcode5 do? Where's the documentation?
#
# Version 2.6
# For latest version, see: http://stackoverflow.com/questions/49478/git-ignore-file-for-xcode-projects
#
@adamgit
adamgit / gist:3705459
Last active December 11, 2023 16:27
Automatically create cross-platform (simulator + device) static libraries for Objective C / iPhone / iPad
##########################################
#
# c.f. http://stackoverflow.com/questions/3520977/build-fat-static-library-device-simulator-using-xcode-and-sdk-4
#
# Version 2.82
#
# Latest Change:
# - MORE tweaks to get the iOS 10+ and 9- working
# - Support iOS 10+
# - Corrected typo for iOS 1-10+ (thanks @stuikomma)