Answer the question
In order to leave comments, you need to log in
How to implement a given ScriptableObject function in Unity?
There is a code (just an example):
using UnityEngine;
public enum Weapon
{
Sword,
Shield
}
[CreateAssetMenu(fileName = "Test", menuName = "Unity Test", order = 0)]
public class Test : ScriptableObject
{
[SerializeField] private Weapon weapon;
public int damage;
public int defense;
}
Answer the question
In order to leave comments, you need to log in
Well, I basically went the other way:
rewrite ^/news/social/(.*)$ /news/social/?date=$1 break;
rewrite ^/news/(.*)$ /news/?date=$1 break;
Option 1: You write your own custom inspector, where you completely control what and how to display on the screen, when and what to save when changing.
Option 2: You create only one variable Value
and further process it in the code depending on the type.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question