Adam's Lair Forum

game development and casual madness
It is currently 2017/04/25, 08:31

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 59 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6  Next
Author Message
PostPosted: 2015/03/22, 18:30 
Forum Addict
Forum Addict
User avatar

Joined: 2013/09/19, 14:31
Posts: 821
Location: Italy
Role: Hobbyist
From what I can see, I can suggest you to check for the initialization context you are currently in.. if I am not wrong there are some cases where a Component can be initialized before the whole GameObject is complete.

You can add a
Code:
if(context == InitContext.Activate)
{
  ...
}

around your code to be pretty sure it's safe to proceed with assigning values to the other Components

Deviver wrote:
it goes past _emitter assigning line

Well, this doesn't mean that it's not null :mrgreen: see above anyway :) maybe it will be enough

_________________
Come on Duality's Discord channel. It's entertaining and productive! :mrgreen:


Top
 Profile  
 
PostPosted: 2015/03/22, 19:41 
Veteran Member
Veteran Member

Joined: 2015/02/12, 15:27
Posts: 104
Location: Lithuania
Role: Hobbyist
Solved! For the 100th time, thank you!


Top
 Profile  
 
PostPosted: 2015/03/25, 13:54 
Veteran Member
Veteran Member

Joined: 2015/02/12, 15:27
Posts: 104
Location: Lithuania
Role: Hobbyist
I feel like I've asked too many questions on this forum now :D

Now the problem is that when I try to change ParticleEmitter's ColorStart and ColorEnd, it doesn't seem to work. The color will always be the one that is set in the editor. Not sure if it is expected behaviour.

Code:
Code:
ParticleEmitter _emitter = this.GameObj.GetComponent<ParticleEmitter> ();

_emitter.ColorEnd = new ColorRgba (255, 0, 0, 255);
_emitter.ColorStart = new ColorRgba (255, 0, 0, 255);


Top
 Profile  
 
PostPosted: 2015/03/25, 15:29 
Forum Addict
Forum Addict
User avatar

Joined: 2013/09/19, 14:31
Posts: 821
Location: Italy
Role: Hobbyist
Deviver wrote:
I feel like I've asked too many questions on this forum now :D

Nah, it's good to have someone testing my stuff and giving feedback :mrgreen:
Deviver wrote:
Now the problem is that when I try to change ParticleEmitter's ColorStart and ColorEnd, it doesn't seem to work. The color will always be the one that is set in the editor. Not sure if it is expected behaviour.


Not "expected", but it's the way it is now ^^ I didn't think that there would be the necessity to alter the Emitter in real-time, but since it's there, I will add a way to do so :)

For the moment, it's not exactly pretty but you can do as follows
Code:
emitter.Active = false;
//alter the emitter
emitter.Active = true;

Keep in mind that this will also have the effect of erasing all the particles currently alive (if any).

Or just give me a couple days :mrgreen:

_________________
Come on Duality's Discord channel. It's entertaining and productive! :mrgreen:


Top
 Profile  
 
PostPosted: 2015/03/25, 15:58 
Veteran Member
Veteran Member

Joined: 2015/02/12, 15:27
Posts: 104
Location: Lithuania
Role: Hobbyist
That is perfectly fine for my purpose. Gracias! :)


Top
 Profile  
 
PostPosted: 2015/03/26, 22:59 
Forum Addict
Forum Addict
User avatar

Joined: 2013/09/19, 14:31
Posts: 821
Location: Italy
Role: Hobbyist
Core updated to 1.0.5
  • Fixed Commands not correctly chaining into each other

FX updated to 1.0.5
  • Added ParticleEmitter.HasAliveParticles property
  • Added ParticleEmitter.ReInitialize(bool) method that allows to change parameters at runtime

UI updated to 1.0.7
  • Commands updated following Core changes
  • WidgetController now gives precedence to Widgets placed in ScreenOverlay when more than one Widget is at the current mouse position

_________________
Come on Duality's Discord channel. It's entertaining and productive! :mrgreen:


Top
 Profile  
 
PostPosted: 2015/11/03, 19:36 
Member
Member
User avatar

Joined: 2015/10/29, 18:52
Posts: 69
Location: Finland
Role: Hobbyist
Hey SirePi,

Would it be hard to convert this set to 2.0? I would love to get this one in full, it looks amazing!


Thanks.

_________________
.
..
...
....
What?


Top
 Profile  
 
PostPosted: 2015/11/03, 21:54 
Forum Addict
Forum Addict
User avatar

Joined: 2013/09/19, 14:31
Posts: 821
Location: Italy
Role: Hobbyist
misthema wrote:
Hey SirePi,

Would it be hard to convert this set to 2.0? I would love to get this one in full, it looks amazing!
Thanks.


Thanks to you :mrgreen:
In fact, it's already been more or less converted; I only need to finalize some testing on the UI side due to the massive changes I did in the last months, but I'm confident it can be ready before the end of the month (probably earlier).

Is there something in particular that you need? I might be able to accelerate on it ^^

_________________
Come on Duality's Discord channel. It's entertaining and productive! :mrgreen:


Top
 Profile  
 
PostPosted: 2015/11/09, 07:15 
Member
Member
User avatar

Joined: 2015/10/29, 18:52
Posts: 69
Location: Finland
Role: Hobbyist
Hi!

Frozen.FX and Frozen.Procedural would be the one's I'd wanna play with. I like to play around with procedural-everything... ;)

_________________
.
..
...
....
What?


Top
 Profile  
 
PostPosted: 2015/11/09, 13:07 
Forum Addict
Forum Addict
User avatar

Joined: 2013/09/19, 14:31
Posts: 821
Location: Italy
Role: Hobbyist
Alright, Core, Procedural and FX are updated for use with Duality 2.x
For UI, I need to address an issue with keyboard not correctly managing some keys (see topic in programming section) first.

Give me feedback ^^

_________________
Come on Duality's Discord channel. It's entertaining and productive! :mrgreen:


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 59 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6  Next

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group