I have to write editor script that set the reference using a csv file.
var reorderedStages = new SmartReference.Runtime.SmartReference<GameObject>[stagePack.Stages.Count];
foreach (var pair in mapping)
{
//...
if (originalId >= 0 && originalId < stagePack.Stages.Count && newIndex >= 0 && newIndex < reorderedStages.Length)
{
reorderedStages[newIndex] = AssetLoadWrapper.LoadStage(string.Format(AssetLoadWrapper.STAGE_PREFAB_NAME_FORMAT, originalId), null);
}
}
AssetLoadWrapper.LoadStage return a gameObject prefab.
setting reorderedStages's value this way is not allowed. So how do I set the value of SmartReference in code?
I have to write editor script that set the reference using a csv file.
AssetLoadWrapper.LoadStage return a gameObject prefab.
setting reorderedStages's value this way is not allowed. So how do I set the value of SmartReference in code?