Tanoda
|
Represents a base class used in TriLib samples. More...
Public Member Functions | |
void | ShowHelp () |
Shows the help box. More... | |
void | HideHelp () |
Hides the help box. More... | |
void | ShowModelUrlDialog () |
Shows the model URL dialog. More... | |
void | HideModelUrlDialog () |
Hides the model URL dialog. More... | |
void | LoadModelFromURLWithDialogValues () |
Shows the URL selector for loading a model from network. More... | |
virtual void | PlayAnimation () |
Plays the selected animation. More... | |
virtual void | StopAnimation () |
Stops playing the selected animation. More... | |
virtual void | PlaybackAnimationChanged (int index) |
Switches to the animation selected on the Dropdown. More... | |
virtual void | PlaybackSliderChanged (float value) |
Event triggered when the animation slider value has been changed by the user. More... | |
Public Attributes | |
Vector2 | CameraAngle |
Current camera pitch and yaw angles. More... | |
Protected Member Functions | |
void | UpdateCamera () |
Updates the Camera based on mouse Input. More... | |
void | LoadModelFromFile (GameObject wrapperGameObject=null, Action< AssetLoaderContext > onMaterialsLoad=null) |
Shows the file picker for loading a model from local file-system. More... | |
void | LoadModelFromURL (UnityWebRequest request, string fileExtension, GameObject wrapperGameObject=null, object customData=null, Action< AssetLoaderContext > onMaterialsLoad=null) |
Loads a model from a URL. More... | |
virtual void | OnBeginLoadModel (bool hasFiles) |
Event triggered when the user selects a file or cancels the Model selection dialog. More... | |
void | SetLoading (bool value) |
Enables/disables the loading flag. More... | |
virtual void | Start () |
Checks if the Dispatcher instance exists and stores this class instance as the Singleton. More... | |
virtual void | OnProgress (AssetLoaderContext assetLoaderContext, float value) |
Event is triggered when the Model loading progress changes. More... | |
virtual void | OnError (IContextualizedError contextualizedError) |
Event is triggered when any error occurs. More... | |
virtual void | OnLoad (AssetLoaderContext assetLoaderContext) |
Event is triggered when the Model Meshes and hierarchy are loaded. More... | |
virtual void | OnMaterialsLoad (AssetLoaderContext assetLoaderContext) |
Event is triggered when the Model (including Textures and Materials) has been fully loaded. More... | |
Protected Attributes | |
Slider | PlaybackSlider |
Animation playback slider. More... | |
Text | PlaybackTime |
Animation playback time. More... | |
Dropdown | PlaybackAnimation |
Animation selector. More... | |
Selectable | Play |
Play button. More... | |
Selectable | Stop |
Stop button. More... | |
AssetLoaderOptions | AssetLoaderOptions |
Options used in this sample. More... | |
Static Protected Attributes | |
const float | InputMultiplierRatio = 0.1f |
Mouse input multiplier. Higher values will make the mouse movement more sensible. More... | |
const float | MaxPitch = 80f |
Maximum camera pitch and light pitch (rotation around local X-axis). More... | |
Properties | |
static AssetViewerBase | Instance [get] |
Gets the Asset Viewer Singleton instance. More... | |
GameObject | RootGameObject [get, protected set] |
Loaded game object. More... | |
Represents a base class used in TriLib samples.
Definition at line 11 of file AssetViewerBase.cs.
void TriLibCore.Samples.AssetViewerBase.HideHelp | ( | ) |
Hides the help box.
Definition at line 110 of file AssetViewerBase.cs.
void TriLibCore.Samples.AssetViewerBase.HideModelUrlDialog | ( | ) |
Hides the model URL dialog.
Definition at line 128 of file AssetViewerBase.cs.
|
protected |
Shows the file picker for loading a model from local file-system.
Definition at line 137 of file AssetViewerBase.cs.
|
protected |
Loads a model from a URL.
Definition at line 148 of file AssetViewerBase.cs.
void TriLibCore.Samples.AssetViewerBase.LoadModelFromURLWithDialogValues | ( | ) |
Shows the URL selector for loading a model from network.
Definition at line 164 of file AssetViewerBase.cs.
|
protectedvirtual |
Event triggered when the user selects a file or cancels the Model selection dialog.
hasFiles | If any file has been selected, this value is true , otherwise it is false . |
Reimplemented in TriLibCore.Samples.AssetViewer.
Definition at line 175 of file AssetViewerBase.cs.
|
protectedvirtual |
Event is triggered when any error occurs.
contextualizedError | The Contextualized Error that has occurred. |
Reimplemented in TriLibCore.Samples.AssetViewer, and TriLibCore.Samples.FaceBuilder.
Definition at line 224 of file AssetViewerBase.cs.
|
protectedvirtual |
Event is triggered when the Model Meshes and hierarchy are loaded.
assetLoaderContext | The Asset Loader Context reference. Asset Loader Context contains the Model loading data. |
Reimplemented in TriLibCore.Samples.AssetViewer, and TriLibCore.Samples.FaceBuilder.
Definition at line 236 of file AssetViewerBase.cs.
|
protectedvirtual |
Event is triggered when the Model (including Textures and Materials) has been fully loaded.
assetLoaderContext | The Asset Loader Context reference. Asset Loader Context contains the Model loading data. |
Reimplemented in TriLibCore.Samples.AssetViewer, TriLibCore.Samples.AvatarLoader, and TriLibCore.Samples.FaceBuilder.
Definition at line 245 of file AssetViewerBase.cs.
|
protectedvirtual |
Event is triggered when the Model loading progress changes.
assetLoaderContext | The Asset Loader Context reference. Asset Loader Context contains the Model loading data. |
value | The loading progress, ranging from 0 to 1. |
Definition at line 217 of file AssetViewerBase.cs.
|
virtual |
Plays the selected animation.
Reimplemented in TriLibCore.Samples.AssetViewer.
Definition at line 253 of file AssetViewerBase.cs.
|
virtual |
Switches to the animation selected on the Dropdown.
index | The selected Animation index. |
Reimplemented in TriLibCore.Samples.AssetViewer.
Definition at line 264 of file AssetViewerBase.cs.
|
virtual |
Event triggered when the animation slider value has been changed by the user.
value | The Animation playback normalized position. |
Reimplemented in TriLibCore.Samples.AssetViewer.
Definition at line 272 of file AssetViewerBase.cs.
|
protected |
Enables/disables the loading flag.
value | The new loading flag. |
Definition at line 188 of file AssetViewerBase.cs.
void TriLibCore.Samples.AssetViewerBase.ShowHelp | ( | ) |
Shows the help box.
Definition at line 102 of file AssetViewerBase.cs.
void TriLibCore.Samples.AssetViewerBase.ShowModelUrlDialog | ( | ) |
Shows the model URL dialog.
Definition at line 118 of file AssetViewerBase.cs.
|
protectedvirtual |
Checks if the Dispatcher instance exists and stores this class instance as the Singleton.
Reimplemented in TriLibCore.Samples.AssetViewer, TriLibCore.Samples.AvatarLoader, and TriLibCore.Samples.FaceBuilder.
Definition at line 204 of file AssetViewerBase.cs.
|
virtual |
Stops playing the selected animation.
Reimplemented in TriLibCore.Samples.AssetViewer.
Definition at line 258 of file AssetViewerBase.cs.
|
protected |
Updates the Camera based on mouse Input.
Definition at line 93 of file AssetViewerBase.cs.
|
protected |
Options used in this sample.
Definition at line 69 of file AssetViewerBase.cs.
Vector2 TriLibCore.Samples.AssetViewerBase.CameraAngle |
Current camera pitch and yaw angles.
Definition at line 74 of file AssetViewerBase.cs.
|
staticprotected |
Mouse input multiplier. Higher values will make the mouse movement more sensible.
Definition at line 85 of file AssetViewerBase.cs.
|
staticprotected |
Maximum camera pitch and light pitch (rotation around local X-axis).
Definition at line 90 of file AssetViewerBase.cs.
|
protected |
Play button.
Definition at line 59 of file AssetViewerBase.cs.
|
protected |
Animation selector.
Definition at line 54 of file AssetViewerBase.cs.
|
protected |
Animation playback slider.
Definition at line 44 of file AssetViewerBase.cs.
|
protected |
Animation playback time.
Definition at line 49 of file AssetViewerBase.cs.
|
protected |
Stop button.
Definition at line 64 of file AssetViewerBase.cs.
|
staticget |
Gets the Asset Viewer Singleton instance.
Definition at line 14 of file AssetViewerBase.cs.
|
getprotected set |
Loaded game object.
Definition at line 79 of file AssetViewerBase.cs.