All pastes #2130783 Raw Edit

Unnamed

public text v1 · immutable
#2130783 ·published 2012-03-20 17:05 UTC
rendered paste body
Exception: Error building Player because scripts had compiler errors
UnityEditor.BuildPlayerWindow.BuildPlayerWithDefaultSettings (Boolean askForBuildLocation, BuildOptions forceOptions)
UnityEditor.BuildPlayerWindow.GUIBuildButtons (Boolean enableBuildButton, Boolean enableBuildAndRunButton, Boolean canInstallInBuildFolder)
UnityEditor.BuildPlayerWindow.ShowBuildTargetSettings ()
UnityEditor.BuildPlayerWindow.OnGUI ()
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture)
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture)
System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters)
UnityEditor.HostView.Invoke (System.String methodName, System.Object obj)
UnityEditor.HostView.Invoke (System.String methodName)
UnityEditor.HostView.OnGUI ()

	void OnGUI() {
		
		if(download == null){
    		if(GUILayout.Button("Load prefab")) { 
    			StartCoroutine("StartDownload"); 
				//StartDownload(assetLink);
    		}
    	}
    
		else {
			if(download.error == null){
    			float progress = (download.progress * 100);
    			GUILayout.Label(progress + "%");

    			if(download.isDone && GUILayout.Button("Unload Resource")){
    			
    				download.Dispose();
    				download = null;
    				assetbundle.Unload(true);
    				assetbundle = null;
    				Destroy(asset);
    			}
    		
				else {
    				GUILayout.Label(download.error);	
    			}
			}
    	}	
	}