rabidus-test/Assets/Plugins/QFSW/Quantum Console/Source/Scripts/Parsing/Parsers/GameObjectParser.cs

22 lines
523 B
C#

using QFSW.QC.Utilities;
using UnityEngine;
namespace QFSW.QC.Parsers
{
public class GameObjectParser : BasicQcParser<GameObject>
{
public override GameObject Parse(string value)
{
string name = ParseRecursive<string>(value);
GameObject obj = GameObjectExtensions.Find(name, true);
if (!obj)
{
throw new ParserInputException($"Could not find GameObject of name {value}.");
}
return obj;
}
}
}