Registering the custom AssetLoader

Apr 26, 2010 at 2:42 PM

Hi there,

Im impressed the 3D engine. I am currently comparing Balder to Kit3d, and I am having issues with trying to register my custom AssetLoader which I have created to read in .obj files.

Is there a way to register/use my class?


Apr 26, 2010 at 11:29 PM


In the latest source code for Balder, you don't need to register anything, you just need to include the assembly that holds the AssetLoader in your Silverlight project - so that Balder can find it.

Let me know if you're having trouble with it.

Apr 27, 2010 at 8:43 AM

Oh, as easy as that :)

Are you guys using reflection to detect the assmebly?

If so, are you not worried about the performance impact on the load?

What may be a nice idea is that the ContentHandler takes in a Action/Func which a person could load the object... That way, the perfomace would improve quite a bit..What do you think?


Apr 27, 2010 at 9:52 AM

The reflection is only done once at startup and has very little impact. The system collects all AssetLoaders and puts them in a Dictionary based upon the fileextension(s) the AssetLoader supports.

Apr 27, 2010 at 10:08 AM

Ok cool!

Im still having trouble though! I create the class in a differnt silver light class library and added the reference to that dll. Its not being picked up though.

Any ideas?






Apr 27, 2010 at 10:57 AM

Are you using the latest source code from Balder? Or are you using the release?   The release does not have this behavior as I did it only 3-4 days ago.

If you're using the latest source code, I'd love to see whats going on - so if its possible for you to email me your solution to : einar _at_ dolittle _dot_ com , I'll see what I can as soon as possible.


Apr 28, 2010 at 7:09 AM

Yip, Im using the release. will mail the source to you now!



Apr 28, 2010 at 10:37 AM

Then you won't get this to work - I recommend you download the latest Balder source and build it and use that instead.

Apr 28, 2010 at 2:32 PM

Ok cool, Im using Tortise SVN to try download the that ok?

Im also trying to get it from this link:

Is that right? I got an error when trying to use this link.

Apr 28, 2010 at 2:53 PM

You need Mercurial, so something like TortoiseHG will work, and the URL is :

Apr 29, 2010 at 8:04 AM

OK, I finally go the code and compiled it!

I placed the newly created dlls into my project, replacing the old ones, but now, my entry point is no longer firing the OnInitialize and OnLoadContent() methods any more, and if I do them manually, the ContentManager is null... Ill play around with it and is if it is me being silly or not.


Thanks for the help!




Apr 29, 2010 at 11:20 AM

Is this the same source as you emailed me? If not, could you update me with your latest code so I can debug and see whats going on.