void CreatePlatform(float positionY, Vector2 normal) { var platformData = new PlatformData(30, normal); simulator.AddPlatform(platformData); platformData.SetPositionX(0); platformData.SetPositionY(positionY); var platformObject = new GameObject("Platform"); var platformController = platformObject.AddComponent <Platform>(); platformController.SetData(platformData); platforms.Add(platformData); }