Asset Prices
All tracked/Tools/Utilities/Denis535

Addressables Source Generator

A field report on Unity Asset Store pricing, by way of Denis535

Addressables Source Generator
§ 02The data

Not enough price points yet for Addressables Source Generator. Check back soon.

No recorded changes yet.

§ 03About this asset
Overview This package is an add-on to Addressables that gives you the ability to use your assets in a very convenient way with compile-time checking. How to generate source codes You can use an `AddressablesSourceGenerator` asset. ``` var generator = AssetDatabase.LoadAssetAtPath<AddressableSourceGenerator>( AssetDatabase.GUIDToAssetPath( AssetDatabase.FindAssets( "t:AddressableSourceGenerator" ).Single() ) ); generator.Generate(); ``` Or you can use an `ResourcesSourceGenerator` and `LabelsSourceGenerator` classes. ``` var settings = AddressableAssetSettingsDefaultObject.Settings; new ResourcesSourceGenerator().Generate( "Assets/UnityEngine.AddressableAssets/R.cs", "UnityEngine.AddressableAssets", "R", settings ); new LabelsSourceGenerator().Generate( "Assets/UnityEngine.AddressableAssets/L.cs", "UnityEngine.AddressableAssets", "L", settings ); ``` Example of generated source codes It generates source codes that looks something like this: ``` namespace UnityEngine.AddressableAssets { public static class @R { public static class @MyProject { public static class @Scenes { public const string @MainScene = "MyProject/Scenes/MainScene.unity"; public const string @GameScene = "MyProject/Scenes/GameScene.unity"; } } } public static class @L { public const string @default = "default"; public const string @Scene = "scene"; } } ``` How to use generated source codes You can use your assets very easily: ``` var address = R.MyProject.Scenes.MainScene; var label = L.Scene; ```

Description sourced from the Unity Asset Store listing.

§ 04Frequently asked
Who publishes Addressables Source Generator?

Addressables Source Generator is published by Denis535 on the Unity Asset Store.

§ 05Also marked down