Skip to content

Instantly share code, notes, and snippets.

favoyang / BuildAddressables.cs
Last active Dec 18, 2021
Build addressable bundles when clicking the build button
View BuildAddressables.cs
/// <summary>
/// The script gives you choice to whether to build addressable bundles when clicking the build button.
/// For custom build script, call PreExport method yourself.
/// For cloud build, put BuildAddressablesProcessor.PreExport as PreExport command.
/// Discussion:
/// License: The MIT License
/// </summary>
using UnityEditor;
using UnityEditor.AddressableAssets;
ProGM / ExampleBehavior.cs
Created Oct 19, 2016
A PropertyDrawer to show a popup field with a generic list of string for your Unity3d attribute
View ExampleBehavior.cs
public class MyBehavior : MonoBehaviour {
// This will store the string value
[StringInList("Cat", "Dog")] public string Animal;
// This will store the index of the array value
[StringInList("John", "Jack", "Jim")] public int PersonID;
// Showing a list of loaded scenes
[StringInList(typeof(PropertyDrawersHelper), "AllSceneNames")] public string SceneName;