UrhoSharp - Sending events is only supported from the main thread (works on iOS , not Android)

AbhiNilAbhiNil CAMember ✭✭✭

Hi ,

I'm trying to populate my scene from my page after it has been created but i'm getting the above error.
This is for android , it works on Ios

01-05 18:45:19.139 E/Urho3D  (32719): Sending events is only supported from the main thread
01-05 18:45:19.139 E/Urho3D  (32719): Sending events is only supported from the main thread
01-05 18:45:19.139 E/Urho3D  (32719): Sending events is only supported from the main thread
01-05 18:45:19.139 E/Urho3D  (32719): Attempted to get resource Models/Box.mdl from outside the main thread
01-05 18:45:19.149 E/Urho3D  (32719): Attempted to get resource Materials/Stone.xml from outside the main thread

Any idea how to add items to my scene after it has been created ?

urhoApp?.addItem(urhoval);

In my urho App :

public void addItem(string p)
        {

            modelNode2 = scene.CreateChild(p);
            modelNode2.Position = new Vector3(5.0f, 1.0f, 5.0f);

            modelNode2.SetScale(10.0f);

            var obj2 = modelNode2.CreateComponent<StaticModel>();
            obj2.Model = ResourceCache.GetModel("Models/Box.mdl");
            obj2.SetMaterial(urhoAssets.GetMaterial("Materials/Stone.xml"));
        } 

Best Answer

Answers

  • Abhijeet_SuryaAbhijeet_Surya USMember ✭✭✭

    @EgorBo

    I am trying load scene from xml which I have saved through app only.

    I have added deserlisation & serialisation to custom component

    loading dosent through any error but it renders empty scene, can you please guide me for this ?

Sign In or Register to comment.