I have a gameobject with script to store Texture2D frames. Now I have Texture2D AUS, RUS, and 30 other countries. Each country need to store 48 frames. And I have 5 of this gameobject. Other than drag and drop each of the images into the AUS[47], are there ways to assign using something like this way AUS[0] = “image_name” in the script?
I will reuse the script for gameobjects in different scenes. Drag and drop 48 frames (each country) for 32 countries for a multiple times is really time consuiming.
Another question about shader. How to use a certain shader in script, such as Refractive?
List<int> tackleFramesList = new List<int>() {3, 7, 11, 15, 19, 23, 27, 31};
int imageUserCount=0;
int tacleFramesCount=0;
for(int i=0;i<element.Count();i++)
{
if (i = tackleFramesList[tacleFramesCount])
{
tackle_User[0].tackleFrames[tacleFramesCount] = AUS*;*
tacleFramesCount += 1; } else { image_User[0].frames[imageUserCount] = AUS*; imageUserCount += 1;
_}_
_}*_ you could replace tackle_User[0] and image_User[0], for a tackle_User[PlayerNumber], image_User[PlayerNumber] or something similar which will be tracking each of your 3 players, also all of the code in your “AUS” statement could be in a method that receives AUS as a parameter, then assing everything as you had already did, and send an other AUS kind element and a new list of elements to assing to the tackle_User, the same as the number of the User. Good luck and happy coding