<commit_before>﻿using System.Collections;
using UnityEngine;
using UnityEngine.Networking;

public abstract class GameMessageBase : MessageBase
{
	public GameObject NetworkObject;
	public GameObject[] NetworkObjects;

	protected IEnumerator WaitFor(NetworkInstanceId id)
	{
		int tries = 0;
		while ((NetworkObject = ClientScene.FindLocalObject(id)) == null)
		{
			if (tries++ > 10)
			{
				Debug.LogWarning("GameMessageBase could not find object with id " + id);
				yield break;
			}

			yield return YieldHelper.EndOfFrame;
		}
	}

	protected IEnumerator WaitFor(params NetworkInstanceId[] ids)
	{
		NetworkObjects = new GameObject[ids.Length];

		while (!AllLoaded(ids))
		{<commit_msg>Print more info if the message times out while waiting<commit_after>﻿using System.Collections;
using UnityEngine;
using UnityEngine.Networking;

public abstract class GameMessageBase : MessageBase
{
	public GameObject NetworkObject;
	public GameObject[] NetworkObjects;

	protected IEnumerator WaitFor(NetworkInstanceId id)
	{
		int tries = 0;
		while ((NetworkObject = ClientScene.FindLocalObject(id)) == null)
		{
			if (tries++ > 10)
			{
				Debug.LogWarning($"{this} could not find object with id {id}");
				yield break;
			}

			yield return YieldHelper.EndOfFrame;
		}
	}

	protected IEnumerator WaitFor(params NetworkInstanceId[] ids)
	{
		NetworkObjects = new GameObject[ids.Length];

		while (!AllLoaded(ids))
		{
{'fraction_non_alphanumeric': 0.096045197740113, 'fraction_numerical': 0.00423728813559322, 'mean_word_length': 4.623015873015873, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2648438', 'n_tokens_mistral': 479, 'n_tokens_neox': 426, 'n_words': 117}