Archive for the ‘Unity3d’ Category

Unity + DLL + MonoBehaviour

Wednesday, April 28th, 2010

Hi people!

Sorry for my absence but in last months I was engaged in my new job at Ubisoft (I’ll talk more later), I was hired as a C++ and Flash programmer here and started working hard since the beginning :)!

I’m finishing my first project here and will be releasing some news in 1 month from now!

Stay tunned!

But this post is to help people with Unity in matter that bothered me for almost a year!!! :D

There is a recurrent problem I constantly saw in forums and internet!

Using Monobehaviour based classes created inside a .dll in Unity throws a warning that the Component cannot be found/added!

The steps that causes this error are:

1 ) Create a DLL project in your editor.

2 ) Inside this project write a class that extends MonoBehaviour

3 ) Try to use it in UnityEditor

4 ) Unity throws “Can’t add ‘Class’ component because it doesn’t exists!”So the problem is that you need to externalize all implementation of your Class:Monobehaviour in order that it works!I found a nice workaround for this problem!

Follow this steps!

1 ) Create the DLL solution.

2 ) Create in the solution:

namespace com.your.namespace{ public class MyComponent : MonoBehaviour{}}

3 ) Generates the .dll (MyComponent now is in its assembly)

4 ) Go to UnityEditor, drop this dll in the “Plugins” folder as everybody knows.

5 ) Create a ‘MyComponent.cs’ file in this folder (or it can be anywhere).

6 ) In ‘MyComponent.cs’ of the UnityEditor write this one line:

public class MyComponent : com.your.namespace.MyComponent{};

7 ) Finished!!! Now every GameObject inside your .dll that call ‘AddComponent(”MyComponent”);’ will not cause the “Can’t add component because it doesn’t exists” error!”

This hack allow you to implements all your features that uses the MonoBehaviour class and hide it in the dll. In the UnityEditor only a “proxy” to the component name is made in order to all GameObjects could find it!

 

Any questions ask!

Aquiris new Game!

Wednesday, June 10th, 2009

Hey ppl!

This week we launched our newest game!

Super Volei Brasil 2!

It’s a street volley game that runs in single player and multiplayer up to 4 players!

We made it in Unity3d during a 90 days programming rush :D

The game is aimed for Brazil so it’s in portuguese! But it’s easy to figure where you cna create rooms!

Click in “BAIXE O GAME” (Download the Game)

Our team is mainly in the “Aquiris” Room to make some tests so you can find ppl to play there easily!

logosvb2.png

The game has an installer that make all work for you, so just enjoy!

See ya!

Unity3d <-> Flash/HTML Integration

Wednesday, December 24th, 2008

Hey!

So much time passed since my last post that I changed my job, started learning Unity3d and helped in the creation of a integration tool for Unity3d-Flash-HTML… :D

Well first things first. My new salary-provider-ambient is the Aquiris Game Experience game house. Between Call of Duty 4 matches we develop some nice webgames using the newcomer Unity3d webplayer plugin.

Aquiris Logo      Unity3D Logo

Some of our titles are shown in this post of DrawLogic Blog.

In our site is the list of games we developed so far (actually before I entered Aquiris :) )

My main roll yet is Flash develop (no I didn’t drop my AS3 curriculum) . I’ll create the microsites for the games being developed. If there is no microsite, then vacation…

Nah.. I’d wish.. :D

With no microsite I’ll help with the Unity3d develop in a more technical way. I have some knowledge in shader programming (HLSL, GLSL, …) that have similarities with the shaders used in Unity3d and some experience in creating frameworks. So I check all things developed in the projects so far and try to make some generics classes and project specs that will fasten the develop time for future projects.

In the meantime I’ll try to learn Unity3d for real in order to help directly in the games being developed.

One of my first projects (developed together with the team) is the Unity3d Integration Kit. It’s a set of tools that aims to simplify the embbeding of Unity application in HTML and it’s communication with any Flash/AS3 that is in the same Page.

U3dObject Logo

If you interested. Be sure to download it and report any bug found!

If you have some ideas use the code.google API and suggest some crazy ideas for us! We will try to improve it in the next versions!

Right now I’m in the middle of  developing my personal framework that will help my freelancing work a bit faster. And a subset of this framework is my Litr class. I finished the core and now on top of it I’ll put my past experience in Litr and some AS3 underground tween system I created to make the last tween application.

I expect that in the early 2009 I’ll have a working version of it!

Merry Christmas for All you!!