Skip to content

When Print Log in Mobile Console It print only 8 contacts from start and then repeat same process. #26

@Nameless77

Description

@Nameless77

it works perfectly but i phase a issue and that is when i debug.log a text string which is contain all the contact details it prints only 8(from 0-7 index in array) contacts and then it repeat the same thing so what is the problem can you please tell me that what is the problem.if you can then please can you help me.
and i am using mobile console(free on asset store) for android to see console massages.

here is the main portion of loop in ContactListGUI.cs

for (int i = startIndex; i < endIndex; i++)
{
if (i % 2 == 0)
GUILayout.BeginHorizontal(evenContactStyle, GUILayout.Width(size.x), GUILayout.Height(size.y));
else
GUILayout.BeginHorizontal(oddContactStyle, GUILayout.Width(size.x), GUILayout.Height(size.y));
GUILayout.Label(i.ToString(), style);
Contact c = Contacts.ContactsList[i];

        if (c.PhotoTexture != null)
        {
            GUILayout.Box(new GUIContent(c.PhotoTexture), GUILayout.Width(size.y), GUILayout.Height(size.y));
        }
        else
        {
            GUILayout.Box(new GUIContent(contactFaceStyle.normal.background), GUILayout.Width(size.y), GUILayout.Height(size.y));
        }

        string text = "\n";
        text += "Name : " + c.Name + "\n";
        for (int p = 0; p < c.Phones.Count; p++)
        {
            text += "Number : " + c.Phones[p].Number + "\n" + " , Type " + c.Phones[p].Type + " \n";
        }
        for (int e = 0; e < c.Emails.Count; e++)
            text += "Email  : " + c.Emails[e].Address + "\n" + " : Type " + c.Emails[e].Type + "\n";
        for (int e = 0; e < c.Connections.Count; e++)
            text += "Connection : " + c.Connections[e] + "\n";
        text += "------------------";
        print(text);
        GUILayout.Label(text, style, GUILayout.Width(size.x - size.y - 40));
        GUILayout.Space(50);
        GUILayout.EndHorizontal();
    }
    int afterHeight = (int)((Contacts.ContactsList.Count - (startIndex + 6)) * size.y);
    if (afterHeight > 0)
    {
        //fill invisible gap after scroller to make proper scroller pos
        GUILayout.BeginHorizontal(GUILayout.Width(size.x * 2), GUILayout.Height(afterHeight));
        GUILayout.Box(" ", nonStyle2);
        GUILayout.EndHorizontal();
    }
    else
    {
        GUILayout.BeginHorizontal(GUILayout.Width(size.x * 2), GUILayout.Height(1f));
        GUILayout.Box(" ", nonStyle2);
        GUILayout.EndHorizontal();
    }
    GUILayout.EndScrollView();
}

basically after "text += "------------------";" this i simply print that text value which is a string.but it print 8 contacts with its detail and then again the loop starts from first contact.and this is happened only with debugging the message.it create GUI perfectly and print all my 286 contacts with details but when it comes to debugging in console it prints only 8 contact.
so can you please help me.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions