You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
An [AssetIcon] attribute is on a member that returns an AudioClip.
An [AssetIcon] attribute is on a method that accepts an IAssetPreview as a parameter.
And when:
The user double-clicks the ScriptableObject asset.
The user right-clicks the ScriptableObject asset and selects 'Open'.
The user selects the ScriptableObject asset and presses return.
The action associated with the ScriptableObject is invoked.
Playing an AudioClip should also be configurable. Every play of the AudioClip should allow the user to vary the following:
The volume of the AudioClip.
The pitch of the AudioClip.
How long the AudioClip should be played.
Examples
An AudioClip should be quickly and easily associated with the ScriptableObject.
using AssetIcons;using UnityEngine;[CreateAssetMenu]publicclassItemInformation:ScriptableObject{[AssetIcon]publicAudioClipPickupSound;}
An IAssetPreview should be used to allow the user to have more control over how the ScriptableObject icon is previewed.
using AssetIcons;using UnityEngine;[CreateAssetMenu]publicclassItemInformation:ScriptableObject{publicAudioClipPickupSound;[AssetIcon]publicvoidOnPreviewAsset(IAssetPreviewassetPreview){
assetPreview.PlaySound(PickupSound,0.5f,0.95f);}}
The text was updated successfully, but these errors were encountered:
When a
ScriptableObject
asset that has either:[AssetIcon]
attribute is on a member that returns anAudioClip
.[AssetIcon]
attribute is on a method that accepts anIAssetPreview
as a parameter.And when:
ScriptableObject
asset.ScriptableObject
asset and selects 'Open'.ScriptableObject
asset and presses return.The action associated with the
ScriptableObject
is invoked.Playing an
AudioClip
should also be configurable. Every play of theAudioClip
should allow the user to vary the following:AudioClip
.AudioClip
.AudioClip
should be played.Examples
An
AudioClip
should be quickly and easily associated with theScriptableObject
.An
IAssetPreview
should be used to allow the user to have more control over how theScriptableObject
icon is previewed.The text was updated successfully, but these errors were encountered: