Topic: Characters will not show

I have made one of my characters a prefab but how do I change the prefab into an asset so I can use the character in UFE. It was originally an FBX but when I create a character file the character is selectable with the correct images but no character appears during gameplay. If someone could provide me a tutorial on importing your own character it would be GREATLY appreciated!

Share

Thumbs up Thumbs down

Re: Characters will not show

Have a look these pages:

Character Editor

HitBoxes Setup

Mecanim Tutorial

There is a bit of a learning curve to get used to everything.  But I think it's worth grinding through it all because there's just so much to cover and understand.

If you still get stuck, let me know.

Share

Thumbs up Thumbs down

Re: Characters will not show

So I have not been editing the height and blood options, could that be the reason they won't show up?

Share

Thumbs up Thumbs down

Re: Characters will not show

[media]http://youtu.be/5o2B56YUxNc[/media]
http://youtu.be/5o2B56YUxNc
This is the video I created to show my problem

Share

Thumbs up Thumbs down

Re: Characters will not show

Strange you get nothing displaying at all.  While playing the game, look in the Hierarchy.  You should see a Game object, expand that until you see Player1 and Player2.  Select each of those and expand them.  Is your character in there, if so can you see them in the Scene view?

In your Character File, you have Buddytest6 in the Character Prefab.  When you click Open Character, does he show up for hitbox setup? 

Also, can you show us the inspector of that prefab?  It should have Hitboxes Script attached.

Share

Thumbs up Thumbs down

Re: Characters will not show

YumChaGames wrote:

Strange you get nothing displaying at all.  While playing the game, look in the Hierarchy.  You should see a Game object, expand that until you see Player1 and Player2.  Select each of those and expand them.  Is your character in there, if so can you see them in the Scene view?

In your Character File, you have Buddytest6 in the Character Prefab.  When you click Open Character, does he show up for hitbox setup? 

Also, can you show us the inspector of that prefab?  It should have Hitboxes Script attached.

[media]http://youtu.be/Ux-FQFqA0Oo[/media]

Share

Thumbs up Thumbs down

Re: Characters will not show

OK, so the problem isn't that your character is falling through the stage or anything since your hitboxes are still at the P1 start position.  The problem seems to be your character mesh isn't imported correctly.

Without using UFE and just through Unity itself (start a new project without UFE installed), are you able to import your character model and have it appear in a simple game?

Also, just FYI.  Don't click Open Character while the game is running.  It's supposed to be used only in Unity Editor for set up.  You've also got your Buddietest6 Gameobject in the Scene (hierarchy), which it shouldn't be (delete it).

Share

Thumbs up Thumbs down

Re: Characters will not show

Ok. Just two things though. If I pick two characters that I did not create they fall right through the ground. And also, my Buddie character is working in a normal Unity file. I also added a camera and light to him.

Share

Thumbs up Thumbs down

Re: Characters will not show

Usually, falling through the ground is because of the stage.  Have you edited the default stage file?  Try re-importing it if there's an issue.

If your character model is working fine in normal Unity, then I'm not sure why it's not working in UFE... Are you sure you followed the importing process and hitboxes setup correctly?

Share

Thumbs up Thumbs down

Re: Characters will not show

What is the exact method to importing a character? I will try it again

Share

Thumbs up Thumbs down

Re: Characters will not show

when the game has begun, click pause and go to the scene view and have a quick look around, sometimes if the charaters are not in the center, the will be offset behind the wall.

Share

Thumbs up Thumbs down

Re: Characters will not show

Importing Character models
From your 3D software, export an FBX of your character model.  Or if your 3D software is supported, you can save in the 3D file's format (ie: .blend if using Blender).  Save this file somewhere in your Unity project's Assets folder.  I tend to use something like Assets\Imported Files\ and have sub folders to group things (characters, stages etc), but use whatever folder structure suits you.

In Unity in your Project view, go to the location you saved the file, click on it and look at the Inspector.  Normally, you'd need to adjust the Scale Factor, but we can worry about that later. 

Click on Rig tab, and ensure it's either Legacy or Humanoid (Mecanim) animation type.  Use Legacy if your animations are using the old Unity animation system; otherwise use Humanoid.  If you get a cross (x) next to Configure button, then your rig is not Mecanim compatible.  Go back to your 3D package and create a rig that is Mecanim compatible.  Google to find out how, it's well beyond the scope here wink.

Click Apply and you're done importing.

Creating Character Prefab for UFE
The Hitboxes Tutorial goes through this, but here's a text version.

Drag the FBX/imported 3D file from your saved location in the Project view to the Hierarchy view.  You should see your character in your Scene view as well. 

Click on it in the Hierarchy, and in the Inspector click Add Component button.  Type Hitbox, and you should see the HitboxesScript come up.  Select it to add the Hitbox Script to the character game object.

To create a prefab of the character, drag it from the Hierarchy back into the Project view somewhere (I use Assets\<MyGameName>\Character Prefabs\ just to keep things organised).  The game object in your Hierarchy will now be blue to signify it is associated with a prefab (the Inspector also has 3 new buttons related to this).  You can delete the Hierarchy version now, as we only need the one you created in the Project view.

NOTE:  New Unity users may be confused by the prefab process.  It feels somewhat redundant.  But once you understand what it's capable of doing and why you need to do it this way, it makes sense and you won't look back.  If it feels like you're bouncing between the project and hierarchy too much because of this, but you'll get used to it soon enough.

Lastly, I recommend grabbing a free rigged character from Mixamo to test importing with.  They're already rigged and ready for action, and since it's Mecanim compatible, you can easily swap them into existing Mecanim UFE characters (Kyle and Joan) and they'll just work.

Share

Thumbs up Thumbs down

Re: Characters will not show

I was able to get the character to show in the demo now but it just keeps the T-Pose and is placed in a weird position. I should be able to upload a video tomorrow

Share

Thumbs up Thumbs down

Re: Characters will not show

Check Animation Type and Avatar in Move Sets.  The avatar missing is a common cause for T Poses, Animation Type could also affect it if you have the wrong one selected.

Share

Thumbs up Thumbs down

15 (edited by hgaur725 2015-01-07 05:06:30)

Re: Characters will not show

I Had a sort of this problem but my character is visible in when i play game in the my mac but when i deploy it to device the character is not showing. and at the start of the game this error comes

transform.position assign attempt for 'PlateArmourFemale(Clone)' is not valid. Input position is { NaN, NaN, NaN }.
UnityEngine.Animator:Update(Single)
MecanimControl:_playAnimation(AnimationClip, Single, Single, Boolean) (at Assets/UFE/Scripts/MecanimControl.cs:289)
MecanimControl:Play(AnimationClip, Single, Single, Boolean) (at Assets/UFE/Scripts/MecanimControl.cs:218)
MecanimControl:SetDefaultClip(AnimationClip, String, Single, WrapMode, Boolean) (at Assets/UFE/Scripts/MecanimControl.cs:160)
MoveSetScript:fillMoves() (at Assets/UFE/Scripts/MoveSetScript.cs:242)
MoveSetScript:ChangeMoveStances(CombatStances) (at Assets/UFE/Scripts/MoveSetScript.cs:175)
MoveSetScript:Awake() (at Assets/UFE/Scripts/MoveSetScript.cs:130)
UnityEngine.GameObject:AddComponent(String)
ControlsScript:Start() (at Assets/UFE/Scripts/ControlsScript.cs:117)

Share

Thumbs up Thumbs down

Re: Characters will not show

hgaur725 wrote:

I Had a sort of this problem but my character is visible in when i play game in the my mac but when i deploy it to device the character is not showing. and at the start of the game this error comes

transform.position assign attempt for 'PlateArmourFemale(Clone)' is not valid. Input position is { NaN, NaN, NaN }.
UnityEngine.Animator:Update(Single)
MecanimControl:_playAnimation(AnimationClip, Single, Single, Boolean) (at Assets/UFE/Scripts/MecanimControl.cs:289)
MecanimControl:Play(AnimationClip, Single, Single, Boolean) (at Assets/UFE/Scripts/MecanimControl.cs:218)
MecanimControl:SetDefaultClip(AnimationClip, String, Single, WrapMode, Boolean) (at Assets/UFE/Scripts/MecanimControl.cs:160)
MoveSetScript:fillMoves() (at Assets/UFE/Scripts/MoveSetScript.cs:242)
MoveSetScript:ChangeMoveStances(CombatStances) (at Assets/UFE/Scripts/MoveSetScript.cs:175)
MoveSetScript:Awake() (at Assets/UFE/Scripts/MoveSetScript.cs:130)
UnityEngine.GameObject:AddComponent(String)
ControlsScript:Start() (at Assets/UFE/Scripts/ControlsScript.cs:117)

After editing your character on the Character Editor, are you closing and saving the preview before clicking play? You can't have any previews open when testing your game. It will create a conflict.

Like UFE? Please rate and review us on the Asset Store!
Questions about the Forum? Check out our Karma FAQ.
Don't forget to check our discord channel.