playMaker

Author Topic: help with playmaker variable texture [ SOLVED ]  (Read 5449 times)

colpolstudios

  • Sr. Member
  • ****
  • Posts: 370
help with playmaker variable texture [ SOLVED ]
« on: December 18, 2013, 07:27:20 AM »
I wish to use the play maker variable texture, but notice that it behaves quite different to a coded texture variable.

There is no size option.

What would be the required setup in order to use the play maker variable texture type in the same manner as a coded one?
« Last Edit: December 18, 2013, 02:29:17 PM by colpolstudios »

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: help with playmaker variable texture
« Reply #1 on: December 18, 2013, 07:39:38 AM »
Do you need an action that can set texture width/height? Are you working with GUI?
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

colpolstudios

  • Sr. Member
  • ****
  • Posts: 370
Re: help with playmaker variable texture
« Reply #2 on: December 18, 2013, 08:07:47 AM »
Hi Lane,

I am not working with GUI and do not need to set the texture width or height.

I just need the play maker variable texture type to have the same function,

Size.

The user manually adjusts the size and the inspector shows the elements.

Each element can hold a new texture.

Do you understand what i mean?


Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: help with playmaker variable texture
« Reply #3 on: December 18, 2013, 08:27:47 AM »
Max Size for compression is controlled in import options. It's simple to just click the texture in the project heirarchy to change that setting rather than exposing all of those options in the playmaker editor window space, no?
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

colpolstudios

  • Sr. Member
  • ****
  • Posts: 370
Re: help with playmaker variable texture
« Reply #4 on: December 18, 2013, 08:43:04 AM »
I want to be able to adjust the size of the number of possible texture images used, like you can when coding.

Currently i can only use one with the play maker variable.

How would I expose all of the options in the playmaker editor window space in the same manner as you would when coding?

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: help with playmaker variable texture
« Reply #5 on: December 18, 2013, 08:58:06 AM »
There is no Texture.size variable... Mesh renderer components are the closest thing I can think of but they have an element size for Materials and that is dependent on your UV mapping. Nothing to do with texture variables.

It sounds like might what you want is a generic Array to store a list of Textures, but this is for runtime and you seem to be looking for Editor functionality.
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

colpolstudios

  • Sr. Member
  • ****
  • Posts: 370
Re: help with playmaker variable texture
« Reply #6 on: December 18, 2013, 10:22:35 AM »
It sounds like might what you want is a generic Array to store a list of Textures, but this is for runtime and you seem to be looking for Editor functionality.

Can I create a generic Array like above but for Editor functionality?

There is no Texture.size variable...

Let me explain, if you have a java script and create a variable type texture.

nothing else just the variable.

If you attach the script to an object and select the var name clicking on the little arrow in the inspector.

you get an option size.

You can manually change this size.

The size gives you the ability to add more textures.

This is what i want to do but using play maker can this be done?

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: help with playmaker variable texture
« Reply #7 on: December 18, 2013, 11:18:39 AM »
In order to do that you have to define it with
Code: [Select]
public Texture[] myTexture; but typically its just
Code: [Select]
public Texture myTexture; which does not do have the element size in the inspector.

Unity's doesn't default to that, so PlayMaker doesn't either.

I think you would need to make custom scripts to support this, but I may be missing something.
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

colpolstudios

  • Sr. Member
  • ****
  • Posts: 370
Re: help with playmaker variable texture
« Reply #8 on: December 18, 2013, 12:25:19 PM »
The size only shows after you attach the script.

example photo attached.

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: help with playmaker variable texture
« Reply #9 on: December 18, 2013, 12:45:10 PM »
Yeah, that variable is basically an Array by adding [ ].
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

colpolstudios

  • Sr. Member
  • ****
  • Posts: 370
Re: help with playmaker variable texture
« Reply #10 on: December 18, 2013, 12:59:09 PM »
Sorry to show my weakness with coding, I did not know by adding [] you were working with an array.

Back to the question.

How would I setup and use the play maker variable texture as an array?

Can it be done in the same manner as when coding?

I want to be able to manually change the size of the array and place new texture images into the element slots.


Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: help with playmaker variable texture
« Reply #11 on: December 18, 2013, 01:11:39 PM »
Sorry to show my weakness with coding, I did not know by adding [] you were working with an array.

its no problem!

Quote
How would I setup and use the play maker variable texture as an array?

Can it be done in the same manner as when coding?

I want to be able to manually change the size of the array and place new texture images into the element slots.

No I don't believe it can be done that way. With ArrayMaker you could use the Array List Add action to fill an array with a texture, then just repeat it for the rest of the textures and later retrieve them from the array by index number. It would basically be doing the same thing but with actions rather than editor based drag'n'drop.

Is there any particular reason you need the textures to be in an array in the editor?

This may just be one of those things that's easier to code. PlayMaker makes some things easy but it probably shouldn't replace a quick script if its going to save you a lot of time and headache.
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

colpolstudios

  • Sr. Member
  • ****
  • Posts: 370
Re: help with playmaker variable texture
« Reply #12 on: December 18, 2013, 02:19:27 PM »
Is there any particular reason you need the textures to be in an array in the editor?

I thought it was the only way to do what i wanted.

But this seems much better, With ArrayMaker you could use the Array List Add action to fill an array with a texture, then just repeat it for the rest of the textures and later retrieve them from the array by index number.

I do not have the ArrayMaker were may i get this?

questions.

can i use a int value to define the size of the array and change the size at any time?

Can I keep track of the current index number within the array?

I want to be able to compare to the current number and enter a new state.

Thankyou for your help


Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: help with playmaker variable texture
« Reply #13 on: December 18, 2013, 02:22:47 PM »
ArrayMaker is on the Wiki, and I believe it can do what you asked there.
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

colpolstudios

  • Sr. Member
  • ****
  • Posts: 370
Re: help with playmaker variable texture
« Reply #14 on: December 18, 2013, 02:28:38 PM »
Thank you for your very kind help.

Now off to see how the Array maker works.