I am following the tutorial on creating a 2D game. I just bought AC.
I just finished to the point where I made the MyPlayer a prefab and assigned it to the game editor settings.
I hit play like in the demo (without deleting the myplayer in the scene) and it doesn't look like in the video.
In the video the one in the scene goes away and you are left with one at the starting position and it looks great.
In my game I end up with 2 MyPlayer objects and the one that is being created by the game engine is behind the ParkGround object in the scene.
I think this is because the MyPlayer sprite and the ParkGround sprite are both set to Layer 0.
I didn't see anywhere in the tutorial so far where that gets changed.
I am using using Unity 4.6.2 and I think I am watching the latest tutorial. It has 8 game editor tabs.
Please advise.
Comments
The sorting order issue is sorted out just a little later on in the "Creating a Player" section - specifically at the 19:30 mark.
Without seeing any screenshots of your game, I can't suggest much about the duplicate Players, other than to check your prefab has been tagged as "Player". If that's the case, take a screenshot of your Player gameobject's Inspector, and the Settings Manager, and we'll see what needs to be done.
I don't know quite what you mean by "the hotspot doesn't show" - do you mean in-game, or when editing? If it doesn't show, check that your sprite child is on the Default layer - I may have to update that window with that info as well. Unity made a change to their physics system which means that window unfortunately had to be added after the tutorial was made.
Please take a couple of screenshots of both the Bird's root object Inspector, and the sprite child Inspector, and we'll be able to give more specific advice.
The bird's root object is currently on the Default layer. Move it onto Ignore Raycast, and you'll no longer have the cursor error. Only the clickable object (the sprite itself) should be on Default.
By default, the Hotspot label will be the same as the object's name (in this case, BirdAnim1_0), but you can override this by entering a value into the Label (if not name) field.
So long as you have a Default NavMesh defined, then yes - character evasion should be automatic. This is a checkbox set in the NavMesh's Inspector, but is set to "On" by default.
However, looking at your footage, it does look like the Player is adjusting his course ever so slightly, just not in the right place. The system looks at the Bird's Circle Collider as the object to avoid, so make sure that it is centered around his feet - you can do this by adjusting the Circle Collider 2D component's Centre values. If you have the Scene window open while testing, you'll be able to see the Player's intended Path as represented by a blue line. You can use that to see for sure if the player is indeed avoiding the NPC.