Skip to content

Instantly share code, notes, and snippets.

View Lorenzo501's full-sized avatar
🐲
Making dreams come to life!

Lorenzo Pappalettera Lorenzo501

🐲
Making dreams come to life!
View GitHub Profile
@liortal53
liortal53 / EnumExtensionsExample.cs
Created September 16, 2022 06:01
EnumExtensions Example
using System;
using System.Linq;
[Flags]
public enum Enemy
{
None = 0,
Goblin = 1,
Wizard = 2,
Dragon = 4
@stevemk14ebr
stevemk14ebr / guids
Created September 15, 2020 18:35
COM CLSID, IID's, other guids
This file has been truncated, but you can view the full file.
NAME:AACMFTEncoder VALUE:93af0c51-2275-45d2-a35b-f2ba21caed00
NAME:ACPI_PLD_CONTAINER_BUFFER_GUID VALUE:c02fa109-6a82-4188-9f66-b190ba62db49
NAME:ACPI_PLD_INTERFACE_CLASS_BUFFER_GUID VALUE:1facec76-96a8-4d9e-846e-3a6d687c32fc
NAME:ACPI_PLD_INTERFACE_INSTANCE_ANSI_BUFFER_GUID VALUE:1facea4b-da66-484c-ba5b-5127e05f95b2
NAME:ACPI_PLD_INTERFACE_INSTANCE_GUID_BUFFER_GUID VALUE:1face9db-2530-4248-8ee3-51053aef47c2
NAME:ACPI_PLD_INTERFACE_INSTANCE_UNICODE_BUFFER_GUID VALUE:1face3f6-1a60-4686-9833-ec8402d43b04
NAME:ACPI_PLD_JOINT_BUFFER_GUID VALUE:f01cfc40-3c75-4523-9e44-215cb154bda6
NAME:ACPI_PLD_SPATIAL_BUFFER_GUID VALUE:59af1a1f-aba4-4bb8-81ef-55938e9bc53a
NAME:ADDON_DISABLE_EVENT VALUE:09010002-0204-0002-0000-000000000080
NAME:ADDON_ENABLE_EVENT VALUE:09010001-0104-0001-0000-000000000080
@mattatz
mattatz / WindowControl.cs
Last active July 22, 2024 22:58
Unityの画面の位置や解像度の指定、タイトルバーの消去などを行うユーティリティ
using UnityEngine;
using System.Collections;
using System;
using System.Runtime.InteropServices;
namespace Utils {
// ここからコードを拝借させてもらいました!
// http://answers.unity3d.com/questions/13523/is-there-a-way-to-set-the-position-of-a-standalone.html
//#define DEBUG_THREADING
using UnityEngine;
using System.Collections;
using System.Threading;
using System.Reflection;
public delegate IEnumerator MonitorCoroutine<T> (CoroutineData<T> data);
@liortal53
liortal53 / StringLoggingExtensions.cs
Created June 16, 2014 18:32
Unity Debug.Log Helper
using System;
public enum Colors
{
aqua,
black,
blue,
brown,
cyan,
darkblue,
@AngryAnt
AngryAnt / MultiScene.cs
Created August 9, 2013 10:03
This utility lets you easily combine two scenes into one.
using UnityEngine;
using UnityEditor;
using System.IO;
public class MultiScene
{
[MenuItem ("File/Combine Scenes")]
static void Combine ()
{
/* _______________________________________________________________________________________
_____ ______ __ _
|_ _| | ____| /_ || | _ _ _ SKAN (Suresh Kumar A N)
| | ___ ___ _ __ | |__ __ __ | || |_| | | | | | [email protected]
| | / __/ _ \| '_ \| __| \ \/ / | ||___| | | ' | |
_| || (_| (_) | | | | |____ > < | | | | | |__| | Created on : 13-May-2008
|_____\___\___/|_| |_|______/_/\_\ |_|(_) |_| \.___/ Last Modified : 10-Aug-2012
[ I C O N E X P L O R E R A N D E X T R A C T O R ] Version : 1.4u
_______________________________________________________________________________________
@AngryAnt
AngryAnt / Utilities.cs
Created September 29, 2012 17:59
Example code for "Logging an entire GameObject" blog post on AngryAnt.com
using UnityEngine;
using System.Reflection;
public class Utilities
{
/* ... */
static void LogGameObject( GameObject gameObject, bool children )
{
Component[] components = gameObject.GetComponents( typeof( Component ) );
@AngryAnt
AngryAnt / CameraControl.cs
Created July 6, 2012 12:00
Example of a clamped camera look rotation.
target.RotateAround (target.position, target.right, addedRotation);
bool lookingUp = Vector3.Angle (target.forward, Vector3.up) < Vector3.Angle (target.forward, Vector3.up * -1.0f);
float angle = Vector3.Angle (target.forward, Vector3.Cross (target.right, Vector3.up));
if (angle > forwardAngleClamp)
{
target.RotateAround (target.position, target.right, lookingUp ? angle - forwardAngleClamp : forwardAngleClamp - angle);
}
@AngryAnt
AngryAnt / ContainerGravity.cs
Created July 2, 2012 11:14
Example of simple component for keeping objects inside defined bounds by physically repelling them back when they exit.
using UnityEngine;
using System.Collections;
[RequireComponent (typeof (BoxCollider))]
public class ContainerGravity : MonoBehaviour
{
public float strength = 10.0f;