Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
  • Help Room /
This question was closed Mar 14, 2016 at 02:48 PM by EnriqueL for the following reason:

Problem is not reproducible or outdated

avatar image
0
Question by EnriqueL · Oct 28, 2015 at 10:42 AM · c#uistring

Memory problem on android/ios 1GB ram with string[]?

Hi, I've been working on a new app for both android and IOs, and I've encountered a big problem to mi app, on the register i'm using the UI, but when i instantiate the some buttons, the text on the button disappears after the halve of the list, it only happens on devices with 1Gb of ram. It could be a memory leak? how can i solve that?

here is my related code:

 //provincias
     private string[] provincias ={"Álava","Albacete","Alicante(Alacant)","Almería","Asturias","Ávila","Badajoz","Barcelona","Burgos","Cáceres","Cádiz","Cantabria","Castellón(Castelló)","Ceuta","Ciudad Real","Córdoba","Cuenca","Gerona (Girona)","Granada","Guadalajara","Guipúzcoa","Huelva","Huesca","Islas Baleares (Illes Balears)","Jaén","La Coruña (A Coruña)","La Rioja","Las Palmas","León","Lérida (Lleida)","Lugo","Madrid","Málaga","Melilla","Murcia","Navarra","Orense (Ourense)","Palencia","Pontevedra","Salamanca","Santa Cruz de Tenerife","Segovia","Sevilla","Soria","Tarragona","Teruel","Toledo","Valencia (Valéncia)","Valladolid","Vizcaya","Zamora","Zaragoza "};
     private int[] codigoProvincia = {1 ,2 ,3 ,4 ,33,5 ,6 ,8 ,9 ,10,11,39,12,51,13,14,16,17,18,19,20,21,22,7 ,23,15,26,35,24,25,27,28,29,52,30,31,32,34,36,37,38,40,41,42,43,44,45,46,47,48,49,50};
     

 public void SeleccionaProvincia(){
         panelFondo.SetActive(true);
         panelProvincia.SetActive(true);
         //Provincias provincias;
         for (int i =0; i<provincias.Length;i++){
             GameObject opcionProvincia = (GameObject)Instantiate(textoProvincia);
             opcionProvincia.GetComponentInChildren<Text>().text = provincias[i];
 
             string nombre = provincias[i];
             int codigo = codigoProvincia[i];
             opcionProvincia.GetComponent<Button>().onClick.AddListener(
                 () => {SaveCity (codigo,nombre);}
             );
             opcionProvincia.transform.SetParent (panelProvincia.transform,false);
             
 
 
         }
         panelProvincia.SetActive(true);
     }



Thanks in Advance, and sorry for my poor English.

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

0 Replies

  • Sort: 

Follow this Question

Answers Answers and Comments

39 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

how to connect my Health to my UI 1 Answer

Error CS1061: Are you missing an assembly reference? 2 Answers

How can I make a UI button press affect something in a text box? 0 Answers

Application.LoadLevel is not destroying anything 1 Answer

How to show and remove text before player has started the game? 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges