“Unity CreateAssetMenu” Réponses codées

Unity CreateAssetMenu

using UnityEngine;
using System.Collections;

[CreateAssetMenu(fileName = "Data", menuName = "Inventory/List", order = 1)]
public class MyScriptableObjectClass : ScriptableObject {
    public string objectName = "New MyScriptableObject";
    public bool colorIsRandom = false;
    public Color thisColor = Color.white;
    public Vector3[] spawnPoints;
}
Garb

Unity CreateAssetMenu


[CreateAssetMenu(menuName = "My Objects/Things/First Thing", order = 11)]
public class FirstThing : ScriptableObject
{
}

[CreateAssetMenu(menuName = "My Objects/Things/Second Thing", order = 12)]
public class SecondThing : ScriptableObject
{
}

[CreateAssetMenu(menuName = "My Objects/Things/Third Thing", order = 13)]
public class ThirdThing : ScriptableObject
{
}

[CreateAssetMenu(menuName = "My Objects/Widgets/First Widget", order = 1)]
public class FirstWidget: ScriptableObject
{
}

[CreateAssetMenu(menuName = "My Objects/Widgets/Second Widget", order = 2)]
public class SecondWidget: ScriptableObject
{
}

Selfish Scarab

Réponses similaires à “Unity CreateAssetMenu”

Questions similaires à “Unity CreateAssetMenu”

Parcourir les réponses de code populaires par langue

Parcourir d'autres langages de code