Hi folks,
I thought I'd play with a 3D object menu where clicking on an object in the scene starts the game etc rather than a 2D menu. But there are issues...
I've got a script set up on the 'new game' object;
using UnityEngine;
using System.Collections;
using UnityEngine.SceneManagement;
public class NewGame : MonoBehaviour {
void OnMouseDown() {
SceneManager.LoadScene("TempScene");
}
}
I have an empty object in TempScene that calls the start up event automatically, the event is your bog standard Join Active Group > Spawn Player.
Everything seems to be working except the camera. I can move the character (well, the stand-in object anyway) but the camera isn't attached to him.
Am I missing some code or Event steps?
Thanks for the help,
- Jon
Sort of I suppose. When you hit 'New Game' using the menu as normal, the camera is parented/setup dependant on the settings you've selected in ORK; it doesn't need parenting to the player object or anything else.
My problem is that it's not setting up the main camera as it normally would - it's just leaving it sitting there.
Also check if inside your MainMenu scene, where the ORK startup GameObject is placed, check if the ORKProject file being loaded is the same you are saving in the Editor. I just reported a bug.
The only changes are the appearance of the player model and the _ORK handler thingie. The Ork Project is still the same one.
Checking and, if I go into the Ork Game Starter and enable Call Main Menu, then I can use the New Game button there with no issue - the camera and controls all work fine.
ORK.Game.NewGame(bool loadScene);
If loadScene is true, ORK will load the new game scene, otherwise it wont.
In any case it'll start the start event if you've set it up.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!