Skip to content

Instantly share code, notes, and snippets.

@TiborUdvari
TiborUdvari / ExcemptFromEncryption.cs
Last active December 18, 2024 11:01
Marks ITSAppUsesNonExemptEncryption in Unity generated Info.plist file to false. Doing this no longer requires manually marking the app as not using non-exempt encryption in iTunes Connect for Testflight beta testing.
using UnityEngine;
using UnityEditor.Build;
using UnityEditor.Build.Reporting;
using UnityEditor;
using UnityEditor.iOS.Xcode;
using System.IO;
public class ExcemptFromEncryption : IPostprocessBuildWithReport // Will execute after XCode project is built
{
public int callbackOrder { get { return 0; } }
@Split82
Split82 / UnityShadersCheatSheet.shader
Created April 17, 2018 10:07
Unity Shaders Cheat Sheet
Shader "Name" {
Properties {
_Name ("display name", Range (min, max)) = number
_Name ("display name", Float) = number
_Name ("display name", Int) = number
_Name ("display name", Color) = (number,number,number,number)
_Name ("display name", Vector) = (number,number,number,number)
@leducanhh
leducanhh / GetStreamingAssetsPath.cs
Created July 29, 2016 08:58
[Unity] Get StreamingAssets file path with Android and iOS.
void GetStreamingAssetsPath(string fileName)
{
#if UNITY_EDITOR
dbPath = string.Format(@"Assets/StreamingAssets/{0}", fileName);
#else
// check if file exists in Application.persistentDataPath
var filepath = string.Format("{0}/{1}", Application.persistentDataPath, fileName);
if (!File.Exists(filepath))
@MattRix
MattRix / UnityEditorIcons.txt
Last active April 26, 2025 11:15
A list of all the built-in EdtiorGUI icons in Unity. Use EditorGUIUtility.IconContent([icon name]) to access them.
ScriptableObject Icon
_Popup
_Help
Clipboard
SocialNetworks.UDNOpen
SocialNetworks.Tweet
SocialNetworks.FacebookShare
SocialNetworks.LinkedInShare
SocialNetworks.UDNLogo
animationvisibilitytoggleoff
@mstevenson
mstevenson / FileUtility.cs
Created December 27, 2012 08:52
A small file utility class for Unity. Transform an absolute path into an Assets folder relative path, and get a list of all Resources directories in the project.
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using System.IO;
public class FileUtility {
/// <summary>
/// Determine whether a given path is a directory.
/// </summary>