I am starting to have many scene variables in my project. Some of them are long lists of objects.
The tab ""Scene’’ where all the scene variables are displayed is really not convenient. Each time I have to scroll for a while, looking for a specific variable.
I thought that I could store my scene variables in C# scripts, and call them in VS, but it is not working.
Here is my code:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Unity.VisualScripting;
[System.Serializable, Inspectable]
public class RuneData : MonoBehaviour
{
[Inspectable]
public int runeID;
[Inspectable]
public string runeName;
[Inspectable]
public int runeValue;
[Inspectable]
public int IDOfRequiredResource0;
[Inspectable]
public int AmountOfRequiredResource0;
[Inspectable]
public int IDOfRequiredResource1;
[Inspectable]
public int AmountOfRequiredResource1;
[Inspectable]
public int IDOfRequiredResource2;
[Inspectable]
public int AmountOfRequiredResource2;
[Inspectable]
public int IDOfRequiredResource3;
[Inspectable]
public int AmountOfRequiredResource3;
public List RuneDataList = new List()
{
//WeatherAltar
new RuneData(){runeID = 0, runeName = “Rain0”, runeValue = 0,
IDOfRequiredResource0 = 0, AmountOfRequiredResource0 = 100,
IDOfRequiredResource1 = -1, AmountOfRequiredResource1 = 0,
IDOfRequiredResource2 = -1, AmountOfRequiredResource2 = 0,
IDOfRequiredResource3 = -1, AmountOfRequiredResource3 = 0},
new RuneData(){runeID = 1, runeName = “Rain1”, runeValue = 1,
IDOfRequiredResource0 = 0, AmountOfRequiredResource0 = 150,
IDOfRequiredResource1 = 1, AmountOfRequiredResource1 = 50,
IDOfRequiredResource2 = -1, AmountOfRequiredResource2 = 0,
IDOfRequiredResource3 = -1, AmountOfRequiredResource3 = 0},
};
But this is not working as you can see in the screenshot.
And also it seems that I have to attach the script to every object that needs to access to this variable.
My real goal is to find a way to handle all my scene variables an efficient way without scrolling. Could you suggest some alternatives?
I am not a programmer, so please provide some details if code is involved.
Thank you!




