The CanRecompile
property indicates whether the asset can be recompiled. This is a boolean property that returns true
if the asset is eligible for recompilation, and false
otherwise.
The CanRecompile
property indicates whether the asset can be recompiled. This is a boolean property that returns true
if the asset is eligible for recompilation, and false
otherwise.
Use the CanRecompile
property to check if an asset can be recompiled before attempting to recompile it. This can help prevent unnecessary operations and potential errors in your workflow.
// Example of checking if an asset can be recompiled Editor.Asset asset = GetAsset(); // Assume GetAsset() retrieves an asset if (asset.CanRecompile) { // Proceed with recompilation logic asset.Compile(); } else { // Handle the case where recompilation is not possible Console.WriteLine("Asset cannot be recompiled."); }