FAST SDK Coding Reference 1.0.3
|
A class to help use an image asset loaded from the file system as Sprite
for the current skin in multiple languages.
More...
Public Member Functions | |
override void | Load (string language) |
![]() | |
void | Load (string language) |
Loads the asset from FAST.Application.assets dictionary using language and FAST.AssetFromFile.fileName. | |
Public Attributes | |
Sprite | sprite |
Inspector, Runtime The Sprite that the image asset is loaded into. | |
![]() | |
string | baseFileName |
Inspector, Code The name of the asset with the file extension, but without the prefix or suffix. | |
Protected Member Functions | |
override void | SetNameWithFileExtension () |
When you right-click on FAST.AssetFromFile.baseFileName in the Inspector, this function will run in the Editor to get the filename of the Sprite assigned to FAST.SpriteFromFile.sprite. | |
![]() | |
virtual void | Awake () |
When the script is loaded, FAST.AssetFromFile.UpdateFileName(string) is called to initialize FAST.AssetFromFile.fileName. | |
void | LogAssetNotLoadedError () |
Call this to log an error when an FAST.AssetFromFile cannot be loaded. | |
void | SetNameWithFileExtension () |
When you right-click on FAST.AssetFromFile.baseFileName in the Inspector, this function will run in the Editor to get the filename of an asset assigned to a corresponding Component . | |
void | UpdateFileName (string language) |
Updates FAST.AssetFromFile.fileName using language , FAST.AssetSettings, FAST.AssetFromFile.prefixFileName, FAST.AssetFromFile.baseFileName, and FAST.AssetFromFile.suffixFileName. | |
Private Member Functions | |
void | SetImageSettings () |
When you right-click on FAST.SpriteFromFile.imageSettings in the Inspector, this function will run in the Editor to get the TextureImporterSettings of the Sprite assigned to FAST.SpriteFromFile.sprite. | |
Private Attributes | |
ImageSettings | imageSettings = new() |
Inspector The image import settings to use when loading the image asset as a Sprite . | |
Additional Inherited Members | |
![]() | |
const string | kSharedLanguage = "Shared" |
Use this string as the language name for assets that are the same across all languages and can be shared. | |
![]() | |
string | fileName |
Runtime The full file name combined from the FAST.AssetFromFile.prefixFileName, FAST.AssetFromFile.baseFileName, and FAST.AssetFromFile.suffixFileName at runtime. | |
bool | isSharedByAllLanguages |
Inspector Set to true if this asset is the same across all languages and can be shared. | |
string | prefixFileName |
Settings A string loaded from FAST.AssetSettings that will be added to the front of the FAST.AssetFromFile.baseFileName at runtime. | |
string | suffixFileName |
Settings A string loaded from FAST.AssetSettings that will be inserted to the end of the FAST.AssetFromFile.baseFileName, but before the extension, at runtime. | |
![]() | |
const string | kLanguageTag = "#Language" |
Use this string in the FAST.AssetSettings.prefixFileName or FAST.AssetSettings.suffixFileName to be replaced with the FAST.Application.language at runtime. | |
const string | kProductNameTag = "#ProductName" |
Use this string in the FAST.AssetSettings.prefixFileName or FAST.AssetSettings.suffixFileName to be replaced with the UnityEngine.Application.productName at runtime. | |
const string | kSkinTag = "#Skin" |
Use this string in the FAST.AssetSettings.prefixFileName or FAST.AssetSettings.suffixFileName to be replaced with the FAST.AssetSettings.skin at runtime. | |
A class to help use an image asset loaded from the file system as Sprite
for the current skin in multiple languages.
Assets are stored in FAST.Application.assets dictionary. This class will load the asset by looking it up in the dictionary using language
in FAST.AssetFromFile.Load(string) and FAST.AssetFromFile.fileName.
override void Load | ( | string | language | ) |
Loads the asset from FAST.Application.assets dictionary using language
and FAST.AssetFromFile.fileName.
language | The language of the asset to load. |
FAST.SpriteFromFile.imageSettings are used to load the image asset as a Sprite
into FAST.SpriteFromFile.sprite.
|
private |
When you right-click on FAST.SpriteFromFile.imageSettings in the Inspector, this function will run in the Editor to get the TextureImporterSettings
of the Sprite
assigned to FAST.SpriteFromFile.sprite.
|
protected |
When you right-click on FAST.AssetFromFile.baseFileName in the Inspector, this function will run in the Editor to get the filename of the Sprite
assigned to FAST.SpriteFromFile.sprite.
|
private |
Inspector
The image import settings to use when loading the image asset as a Sprite
.
Sprite sprite |
Inspector, Runtime
The Sprite
that the image asset is loaded into.
Assigned at runtime in FAST.SpriteFromFile.Load(string).