Return to Unity Plugin

GAF Object: Change Atlas Texture Rect

All about Unity plug-in

GAF Object: Change Atlas Texture Rect

Postby Ismael Serrada » February 13th, 2017, 6:48 am

Good day.

I'm using GAF v5.1 for Unity 5.4.3f1 in a 2D game, I'm trying to change via script a costume Atlas Texture rect in a GAF Object. The thing is I want to change this in game play via script, just some coordinates in the X and Y depending on a bool.

So far I have reach into set a new atlasTextureRect but I can't get to change it. First I tried to reach the "x" variable directly but it didn't let me change it; So I tried the method call "Set()" in the atlasTextureRect object but I can't get to change it.

Can you guys help me out to see what I'm doing wrong? I leave the code below.

Thanks in advance

public GAFObject tempGafObj; // Referenced in Unity Hierarchy

Code: Select all
 void Start()

        Debug.Log("Player mask x: " + tempGafObj.serializedProperties.atlasTextureRect.x);

       Debug.Log("Player mask new x: " + tempGafObj.serializedProperties.atlasTextureRect.x);
User avatar
Ismael Serrada
Posts: 1
Joined: February 13th, 2017, 6:32 am

Return to Unity Plugin

Who is online

Users browsing this forum: No registered users and 5 guests