Deprecated: Assigning the return value of new by reference is deprecated in /home/thelabor/public_html/wp-settings.php on line 229

Deprecated: Assigning the return value of new by reference is deprecated in /home/thelabor/public_html/wp-settings.php on line 231

Deprecated: Assigning the return value of new by reference is deprecated in /home/thelabor/public_html/wp-settings.php on line 232

Deprecated: Assigning the return value of new by reference is deprecated in /home/thelabor/public_html/wp-settings.php on line 249

Deprecated: Assigning the return value of new by reference is deprecated in /home/thelabor/public_html/wp-includes/cache.php on line 36

Deprecated: Assigning the return value of new by reference is deprecated in /home/thelabor/public_html/wp-includes/query.php on line 21

Deprecated: Assigning the return value of new by reference is deprecated in /home/thelabor/public_html/wp-includes/theme.php on line 507

Deprecated: Assigning the return value of new by reference is deprecated in /home/thelabor/public_html/wp-content/plugins/codesnippet/codesnippet.php on line 248
.: the laboratory

Unity + DLL + MonoBehaviour

April 28th, 2010    Add to Technorati Favorites

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 Site

December 11th, 2009    Add to Technorati Favorites

Hi!Just to drop by and leave the link to the new Aquiris webpage, with complete portfolio of Unity games we made!You can change the language in the top right corner!http://www.aquiris.com.br I`m not dead! Just overworked :)Expect some news in January!

Aquiris new Game!

June 10th, 2009    Add to Technorati Favorites

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!

ByteTween suggestion

March 18th, 2009    Add to Technorati Favorites

This is more like a request from me…

I have some plans for ByteTween future modules…

They include:

- Filters tweens (glow,blur color matrix,…)

- Curve tweens (already have CatmullRom, CubicBezier,… classes)

- String tweens

But after that I think I’ll be out of ideas… So I’ll ask for you people who access this blog to suggest some ideas here in the IssueTracking system of the code.google interface… Use the tag “[wishlist] your idea” and put some ideas for future modules for ByteTwee… Maybe I’m skipping something important so its good to listen for suggestions :)

ByteTween Wishlist

ByteTween update!

March 4th, 2009    Add to Technorati Favorites

Hey!

Just to notify a new version of ByteTween… It was necessary because some bug fixes it needed, but I also added two new modules (GradientRGB and ARGB) and the ShortTween class that can be used to shortcut some common tweens (x,y,alpha,rotation,scale…).

Check it here!

 TheLaboratory - ByteTween Project

 Thanks !!

ByteTween upgrade..

February 24th, 2009    Add to Technorati Favorites

I swear this is last one for a time :)

ByteTween now goes v1.2 ! The main tween features are pratically the same. But now you can insert it in Modules and control the swf size as you wish.

This is it for now for ByteTween… I’ll add new features as modules now and make a bigger update later!

Expect the launch of MotionPack soon too. A tween system with the basic tween function you need and classes that allow you to create your own tweens as you like. Easy to use… endless possibilities!

The.Laboratory - Tween

I expect to finish Litr Project too. So head to the new code.google page in order for news about tweening code.

I expect to translate to english my course about BitTricks I made on Adobe User Group Rio Grande do Sul . People actually liked it! :)

After working on it I expect to finish my next projects but they will take a lot to be released as they are a bit complex to make really good. They are:

+ 3d Rendering system.

+ Physics simulation.

Thanks!!

thelab tween project + ByteTween v1.1 @ 1.2Kb !!

February 21st, 2009    Add to Technorati Favorites

Not much in the mood for long posting :)

1) Is now UP the official googlecode page  of ByteTween class and the soon-will-be-released TheLaboratory MotionPack!

2) ByteTween class also updated to the v1.1. Now it has a good feature set (alpha+visibility,scale,color(new),frames(new)) and.. what?.. it’s smaller even with new functionalities! The compiled source uses only stupid 1.2Kb of memory :).

3)Please Enjoy!

The.Laboratory - Tween

Aquiris new Unity3d game teaser video!

February 16th, 2009    Add to Technorati Favorites

Hi!

Just to pass the link to the teaser video of our new game!

Gillette Nascar’s YoungGun Game

In the menu, click “the game” and then the option to the teaser shows up!

The feeling of the game is awesome! Just the pre production here is exciting! Eager to see what you guys will think of the official version!

Ridiculously SMALL Tweening Class

February 4th, 2009    Add to Technorati Favorites

Yo!Before launching the official Tweening Package (with proper Interfaces and classes to implement any kind of tweens, and of course with the default Basic Tweening classes).After 4 tween engine implementations I can say I acchieved sort of state of art in tweening matters. With past experience I:Found a class pattern that makes the tween system expandable to any kind of tweens (and can be implemented in virtually any language - actually I perfectly ported this to C#).Created a way to compact all Transition functions in order to reduce file size.Simplified the engine a lot in order to make the update operation as fast as possible.The result of this (besides the package) is a stupidly small tweening class!!The ByteTween static class eats only 1.7Kb of compiled clip! WIth this size it supports:

  • Creation of tweens of any numeric property (not color/uint propperties).
  • Pause,Unpause,Cancel operations based on the tween target and property.
  • Overlap system that cancel tweens of same property in order to avoid erroneous behaviour
  • Alpha tween with negative alpha support (negative alpha sets the MovieClip visibility to false)
  • ’scale’ tween of both ’scaleX’ and ’scaleY’ properties.
  • OnComplete callback with any number of parameters
  • Easy interface for creating new tweens!

The source file of ByteTween is in the Google Code of the Lighter project. In a few days I’ll created a proper project to all new classes that will come up!Together with the source you can find a ExmpleFile to see the creation of a simple tween!

GoogleCode Lighter Project

 ** Edit: I didn`t have much tim to test 100% this code. I have strong belief that it`s perfect but any issue report in the code.google interface!

Tilt Effect in Flash

January 27th, 2009    Add to Technorati Favorites

Playing around in the net, I found this tutorial on how to create Tilt Shift photographs in PhotoShop…

Well… The effects don’t seemed too complex to me and I reproduced them with BitmapData operations…

The result is this demo of Tilt Shift for flash!!

Controls the different parameters in the slider in order to obtain the best result for the photo!

Insert a link in the field and press ENTER to load a new one!!

Crap programming! Don’t expect speed or flawless execution :D

** Flickr links work well! They have crossdomain policies!