Jump to content



Photo

Video - BxBasicDMD - Textures


  • Please log in to reply
24 replies to this topic

#21 chepas

chepas

    t.me/horsepin

  • Members
  • PipPipPipPip
  • 1,966 posts

  • Flag: ---------

  • Favorite Pinball: BSD, Tr0n, SW:Stern

Posted 20 July 2015 - 09:47 AM

Well try not worry about all of the documentation right now!

 

With the behaviors, other table builds, documents on unit3dpinball.net,  and answered questions here, that really is enough for now.

 

Undocumented things like this are fine. If I want a looping image list I've got it, it can wait, this is only for displaying eye candy and not anything to do with displaying for a game, yet.

 

 

EDIT: Actually, you HAVE the scene graph: it's the one in the table Editor. But You don't have the associated components...

 

Ah ok got you. I already made a snapshot of the structure but most thing can be found without a full path to object anyway?

 

GameObject.Find("Cam1") would work the same as GameObject.Find("Playfield/Surfaces/Cam1")


Edited by chepas, 20 July 2015 - 09:50 AM.

Bump maps are the new auto-tune :BDH:
VPX - RSS Updates ---- blog.flippingflips.xyz/en/ -- Visual Pinball No.1 (2021) . Est.2000


#22 BilboX

BilboX

    Enthusiast

  • Unit3D Pinball Team
  • 433 posts
  • Location:French Polynesia

  • Flag: France

  • Favorite Pinball: Metallica, Addams Familly, Scared Stiff, White Water

Posted 22 July 2015 - 08:21 AM

Yes but depending on the table, you may not have every elements as we "clean" the tree structure if empty (no "LeafTargets" category if no leaf targets on the trable).

 

Correct, this will work. But you may have multiple objects with the same name in the scene, that's why sometimes it's better to differentiate with ancestors.

BTW, be carefull not using GameObject.Find in loops, as in Update for example, it costs a lot... prefer keeping references on objects (see my answer on the other topic).

 

Also, what is really missing in the structure is "which behaviour is affected to which object". And there, be carefull. For example, when you write:

AddSolenoid("Bumper1",20,"BxBumperKick")

It does'nt mean you can grab the BumperKick behaviour using:

GameObject.Find("Bumper1").GetComponent<BxBumperKick>()

It sometimes will work but not always. The reason why is because, in this particular case, the behaviour is affect to a child of "Bumper1". We choosed that because for typical user it is easier to register objects, using the FP name.

 

Also, we return diretcly the behaviour in thoses cases, so you can store it directly on the call:

BxBumperKick kick = (BxBumperKick )AddSolenoid("Bumper1",20,"BxBumperKick");

Check taht this is not null btw.

 

Oh, last but not least, we sometimes creates children when importing wiuth THE SAME NAME of the parent. Aka, maybe you can have TABLE/Playfield/Triggers/Trigger1/Trigger1

 

Thus, you are not sure which object you catch using GameObject.Find("Trigger1")...


UP2


#23 chepas

chepas

    t.me/horsepin

  • Members
  • PipPipPipPip
  • 1,966 posts

  • Flag: ---------

  • Favorite Pinball: BSD, Tr0n, SW:Stern

Posted 22 July 2015 - 10:32 AM

Cool that makes sense, cheers.


Bump maps are the new auto-tune :BDH:
VPX - RSS Updates ---- blog.flippingflips.xyz/en/ -- Visual Pinball No.1 (2021) . Est.2000


#24 chepas

chepas

    t.me/horsepin

  • Members
  • PipPipPipPip
  • 1,966 posts

  • Flag: ---------

  • Favorite Pinball: BSD, Tr0n, SW:Stern

Posted 25 July 2015 - 12:22 AM

Weird one here for imagelists.

ArgumentOutOfRangeException: Argument is out of range.

Parameter name: index
  at System.Collections.Generic.List`1[UnityEngine.Texture2D].get_Item (Int32 index) [0x00024] in /Applications/buildAgent/work/b59ae78cff80e584/mcs/class/corlib/System.Collections.Generic/List.cs:635 

  at ImageList.set_current (Int32 texture) [0x00016] in G:\Unity\Pinball Unit3D\PinballUnit3D\trunk\sources\PinballUnit3D\Assets\Plugins\Elements\ImageList.cs:39 

  at ImageList.next () [0x00032] in G:\Unity\Pinball Unit3D\PinballUnit3D\trunk\sources\PinballUnit3D\Assets\Plugins\Elements\ImageList.cs:45 
 
(Filename: G Line: 0)

I think anytime you have digits in the texture name this happens. Remove the digits and its fine, but doesn't really help when I'm trying to use 90 images.

 

test000.jpg

test001.jpg

 

000test.jpg

001test.jpg

 

test000test.jpg

test001test.jpg

 

Doesn't matter even if you have 1 digit she's out of range.

 

Any other way around it apart from new version? Need my robo arcade brought to life.


Edited by chepas, 25 July 2015 - 12:25 AM.

Bump maps are the new auto-tune :BDH:
VPX - RSS Updates ---- blog.flippingflips.xyz/en/ -- Visual Pinball No.1 (2021) . Est.2000


#25 BilboX

BilboX

    Enthusiast

  • Unit3D Pinball Team
  • 433 posts
  • Location:French Polynesia

  • Flag: France

  • Favorite Pinball: Metallica, Addams Familly, Scared Stiff, White Water

Posted 27 July 2015 - 09:01 AM

> To check list


UP2