Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/jackmawer/JacksWorld. An abandoned mini-project that I created while learning to use Unity with networking.
Something went wrong. Try again.
787 B · 40 lines
C#
at master
1234567891011121314151617181920212223242526272829303132333435363738394041using UnityEngine;using System.Collections;
public class ReporterMessageReceiver : MonoBehaviour { Reporter reporter ; void Start() { reporter = gameObject.GetComponent<Reporter>(); }
void OnPreStart(){ //To Do : this method is called before initializing reporter, //we can for example check the resultion of our device ,then change the size of reporter if( reporter == null ) reporter = gameObject.GetComponent<Reporter>();
if( Screen.width < 1000 ) reporter.size = new Vector2( 32 , 32 ); else reporter.size = new Vector2( 48 , 48); } void OnHideReporter() { //TO DO : resume your game }
void OnShowReporter() { //TO DO : pause your game and disable its GUI }
void OnLog( Reporter.Log log ) { //TO DO : put you custom code }
}