Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: fromfame on April 05, 2019, 04:32:53 AM

Title: How to make infinite texts?
Post by: fromfame on April 05, 2019, 04:32:53 AM
I have an infinite amount of text prefabs pooled.

Each text must have a name on it 'Tomas' 'Sara' etc.

I cannot create an infinite amount of global strings, nor can I directly reference clones.

How does one solve this in Playmaker?
Title: Re: How to make infinite texts?
Post by: djaydino on April 05, 2019, 08:18:12 AM
hi, does it need to be prefabs?

As you can use arrays to hold the text string and place on a prefab.

but even then, there is no infinite.

An array can hold over 2 billion booleans, But it depends how much every element takes in bytes. 2.47 billion is the upper limit of integers in c#.

So larger strings would lessen the upper limit.

But you can use more arrays as well if that would not be enough.

But with very large amounts you might reach a limit on memory.
Title: Re: How to make infinite texts?
Post by: fromfame on April 14, 2019, 03:00:59 PM
Thanks for telling me about that. However regarding the original question they're a prefab that contains a mesh, collider, a script, and a text component.

Whenever anything is created there's an issue with Playmaker where I can't reference clones.

I want to spawn buttons but assign a text to them depending on the 'page' a user is on. Direct referencing is the issue. I've had a talk with a C# friend and he said it's very basic in C# but in playmaker that isn't the case for cloned/spawned objects.
Title: Re: How to make infinite texts?
Post by: djaydino on April 14, 2019, 04:20:53 PM
Hi.
When you use 'Create Object' you can store it into a variable .
Then you can do what you want with it (store in an array, change object name etcm edit text)

So far i did not encounter having issues with referencing clones.

Can you give a sample on how to repo the issue?

How does your friend does the reference in c# ?