fehaar / FFWD

This is the FFWD framework for XNA, that allows you to port Unity3D games to XNA for use on WP7 or XBox360 (XBLIG)
Microsoft Public License
133 stars 36 forks source link

XML-Element "body" not found in Logo.xml #55

Open MasterFlu opened 12 years ago

MasterFlu commented 12 years ago

Hi. First of all thank you for that grad tool/plugin. Now back to my problem: i built a scene in Unity and the exporting worked fine. I compiled my project and it runs. but if i add a cube to this scene and give him this script i get the exception: XML-Element "body" not found in Logo.xml

Here the script:

using UnityEngine; using System.Collections;

public class moveToPoint : MonoBehaviour {

public int speed = 1;
public int targetRadius = 3;
private Vector3 target;
public RaycastHit hit;

// Use this for initialization
void Start () 
{
    //rigidbody.freezeRotation = true;
    target = transform.position;
}

// Update is called once per frame
void FixedUpdate () 
{
    //target.y = transform.position.y;

    foreach (Touch touch in Input.touches)
    {
        if (touch.phase == TouchPhase.Began)
        {
            Ray ray = Camera.main.ScreenPointToRay (touch.position);

            if(Physics.Raycast(ray, out hit))
            {
                target = hit.point; 
            }
        }
    }

    if (Vector3.Distance(transform.position, target) > targetRadius) 
    {
        //animation.Play("Default Take");
        transform.LookAt(target); 
        transform.Translate(0,0,speed);                 
    }
}

}

what going wrong in here. hope someone can give me a solution for that. first i thjougt i forgot a rigidbody but this was not the mistake.

fehaar commented 12 years ago

Can you post the XML file as well? Maybe I can see what it is looking for.

MasterFlu commented 12 years ago

Here is the xml file with the lines marked, where Visual Studio says there are the mistakes:

if i post the code it isnt shown in the wright way so i uploaded the file: http://www.xup.in/dl,69624130/Logo.xml/

But without the script on the cube (not on the zombie_house) everything works fine (animation, scene, the other scripts)

thanks for your help.

mydiscogr commented 12 years ago

this error is really common if you works with ffwd, so I get really many for really many reason, but according my experience you can:

1) backup all !!!!! first 2) clear release and debug in all bin directory if you use VSExpress else use clean solution 3) check if you have added all necessary scripts