Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
657 B
4
Indexable
Never
public static class StaticLoaderForGameClass
{
	public static GameObject CreateGameClassObject(somedatapacket packet)
	{
		if(version xxx)
		...Instantiate object
		loaded_data = ...JsonUtility.FromJson<GameClassLoaderVersion_xxx>(packet.datastring)...
		...loaded_data.InputData(object)
	}

	public static class GameClassLoaderVersion_xxx
	{
		public int valueA;
		public string valueB;
		...

		public GameClassLoaderVersion_xxx(GameClassScript script)
		{
			valueA = (somethinsomething)script.valueA?;
			etc...
		}
		public void InputData(GameClassScript script)
		{
			script.valueA? = (somethinsomething)valueA;
		}
	}
}