using System.Collections; using System.Collections.Generic; using UnityEngine; class MoleculeFactoryTester: MonoBehaviour { public TextAsset moleculeJson; public TextAsset atomJson; void Start(){ MoleculeFactory factory = MoleculeFactory.getInstrance(this.moleculeJson); AtomeFactory atomeFactory = AtomeFactory.getInstrance(this.atomJson); factory.setAtomFactory(atomeFactory); GameObject mol = factory.createMolecule("O2"); GameObject mol2 = factory.createMolecule("H2O"); mol.transform.position = new Vector3(0,1,0); GameObject mol3 = factory.createMolecule("C4H10"); mol3.transform.position = new Vector3(0,5,0); //GameObject bon = GameOject.CreatePrimitive(PrimitiveType.) } }