This file contains 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; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using Traits; | |
namespace TraitsMixin | |
{ | |
//trait Similarity | |
public interface TraitSimilarity { |
This file contains 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 System.Collections; | |
public class CameraShake : MonoBehaviour | |
{ | |
// Transform of the camera to shake. Grabs the gameObject's transform | |
// if null. | |
public Transform camTransform; | |
// How long the object should shake for. |
This file contains 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; | |
public class ReplaceMaterials : EditorWindow { | |
static int goCount = 0, replaceCount = 0; | |
private Material currentMaterial = null; | |
private Material replaceMaterial = null; | |
[MenuItem("Stuff/Replace Materials")] | |
public static void ShowWindow() { | |
EditorWindow.GetWindow(typeof(ReplaceMaterials)); |
This file contains 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 System.Reflection; | |
/// <summary> | |
/// Automatically provides a version number to a project and displays | |
/// it for 20 seconds at the start of the game. | |
/// </summary> | |
/// <remarks> | |
/// Change the first two number to update the major and minor version number. |
This file contains 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
// NoiseCrime Gist | |
// 2014.06.21 | |
// Unity Version: 3.5.7+ | |
// This script demonstrates how you can use MenuItem to append commands to a script component context menu. | |
// The new commands will be available by right-clicking on a component header or clicking the little cog icon. | |
// Docs: http://docs.unity3d.com/ScriptReference/MenuItem.html | |
// Note: You must use the current class name/type in both the MenuItem and where the context is used in the code. |
This file contains 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; | |
public static class ConfigurableJointExtensions | |
{ | |
/// <summary> | |
/// Sets a joint's targetRotation to match a given local rotation. | |
/// The joint transform's local rotation must be cached on Start and passed into this method. | |
/// </summary> | |
public static void SetTargetRotationLocal (this ConfigurableJoint joint, Quaternion targetLocalRotation, Quaternion startLocalRotation) | |
{ |
This file contains 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
### | |
# Unity folders and files | |
### | |
[Aa]ssets/AssetStoreTools* | |
[Bb]uild/ | |
[Ll]ibrary/ | |
[Ll]ocal[Cc]ache/ | |
[Oo]bj/ | |
[Tt]emp/ | |
[Uu]nityGenerated/ |
This file contains 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
/* | |
* Created by C.J. Kimberlin | |
* | |
* The MIT License (MIT) | |
* | |
* Copyright (c) 2019 | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining a copy | |
* of this software and associated documentation files (the "Software"), to deal | |
* in the Software without restriction, including without limitation the rights |
This file contains 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; | |
using System.IO; | |
using System.Linq; | |
using System.Linq.Extensions; | |
using UnityEditor; | |
using UnityEngine; | |
namespace PachowStudios.BadTummyBunny.Editor | |
{ | |
[CustomPropertyDrawer(typeof(ScriptableObject), true)] |
This file contains 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
// Unity C# Cheat Sheet | |
// I made these examples for students with prior exerience working with C# and Unity. | |
// Too much? Try Unity's very good tutorials to get up to speed: https://unity3d.com/learn/tutorials/topics/scripting |
OlderNewer