Browse Source

Fixed compile errors in Unity 2018.1 beta

master
Chris Gregan 7 years ago
parent
commit
da29b29a32
  1. 2
      Assets/Fungus/Thirdparty/Usfxr/Scripts/SfxrAudioPlayer.cs
  2. 14
      Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/PlatformRunner/PlatformRunner.cs

2
Assets/Fungus/Thirdparty/Usfxr/Scripts/SfxrAudioPlayer.cs vendored

@ -52,7 +52,7 @@ public class SfxrAudioPlayer : MonoBehaviour {
void Start() { void Start() {
// Creates an empty audio source so this GameObject can receive audio events // Creates an empty audio source so this GameObject can receive audio events
AudioSource soundSource = gameObject.AddComponent<AudioSource>(); AudioSource soundSource = gameObject.AddComponent<AudioSource>();
soundSource.clip = new AudioClip(); soundSource.clip = null; // new AudioClip();
soundSource.volume = 1f; soundSource.volume = 1f;
soundSource.pitch = 1f; soundSource.pitch = 1f;
soundSource.priority = 128; soundSource.priority = 128;

14
Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/PlatformRunner/PlatformRunner.cs

@ -6,6 +6,7 @@ using UnityEditor;
using UnityEditorInternal; using UnityEditorInternal;
using UnityEngine; using UnityEngine;
using System.Linq; using System.Linq;
using UnityEditor.Build.Reporting;
namespace UnityTest.IntegrationTests namespace UnityTest.IntegrationTests
{ {
@ -80,17 +81,28 @@ namespace UnityTest.IntegrationTests
AssetDatabase.Refresh(); AssetDatabase.Refresh();
var result = BuildPipeline.BuildPlayer(configuration.testScenes.Concat(configuration.buildScenes).ToArray(), #if UNITY_2018_1_OR_NEWER
BuildReport result = BuildPipeline.BuildPlayer(configuration.testScenes.Concat(configuration.buildScenes).ToArray(),
configuration.GetTempPath(), configuration.GetTempPath(),
configuration.buildTarget, configuration.buildTarget,
BuildOptions.AutoRunPlayer | BuildOptions.Development); BuildOptions.AutoRunPlayer | BuildOptions.Development);
#else
string result = BuildPipeline.BuildPlayer(configuration.testScenes.Concat(configuration.buildScenes).ToArray(),
configuration.GetTempPath(),
configuration.buildTarget,
BuildOptions.AutoRunPlayer | BuildOptions.Development);
#endif
settings.RevertSettingsChanges(); settings.RevertSettingsChanges();
settings.RemoveAllConfigurationFiles(); settings.RemoveAllConfigurationFiles();
AssetDatabase.Refresh(); AssetDatabase.Refresh();
#if UNITY_2018_1_OR_NEWER
if (result != null)
#else
if (!string.IsNullOrEmpty(result)) if (!string.IsNullOrEmpty(result))
#endif
{ {
if (InternalEditorUtility.inBatchMode) if (InternalEditorUtility.inBatchMode)
EditorApplication.Exit(Batch.returnCodeRunError); EditorApplication.Exit(Batch.returnCodeRunError);

Loading…
Cancel
Save