Browse Source

Merge remote-tracking branch 'snozbot/master'

master
Zach Vinless 9 years ago
parent
commit
8362285d28
  1. 27
      Assets/Fungus/Scripts/Components/SayDialog.cs
  2. 11
      ProjectSettings/ProjectSettings.asset
  3. 2
      ProjectSettings/ProjectVersion.txt

27
Assets/Fungus/Scripts/Components/SayDialog.cs

@ -5,6 +5,7 @@ using UnityEngine;
using UnityEngine.UI;
using System;
using System.Collections;
using System.Collections.Generic;
namespace Fungus
{
@ -54,6 +55,22 @@ namespace Fungus
protected StringSubstituter stringSubstituter = new StringSubstituter();
// Cache active Say Dialogs to avoid expensive scene search
protected static List<SayDialog> activeSayDialogs = new List<SayDialog>();
protected void Awake()
{
if (!activeSayDialogs.Contains(this))
{
activeSayDialogs.Add(this);
}
}
protected void OnDestroy()
{
activeSayDialogs.Remove(this);
}
protected Writer GetWriter()
{
if (writer != null)
@ -200,8 +217,14 @@ namespace Fungus
{
if (ActiveSayDialog == null)
{
// Use first Say Dialog found in the scene (if any)
SayDialog sd = GameObject.FindObjectOfType<SayDialog>();
SayDialog sd = null;
// Use first active Say Dialog in the scene (if any)
if (activeSayDialogs.Count > 0)
{
sd = activeSayDialogs[0];
}
if (sd != null)
{
ActiveSayDialog = sd;

11
ProjectSettings/ProjectSettings.asset

@ -123,6 +123,7 @@ PlayerSettings:
iPhoneTargetOSVersion: 22
tvOSSdkVersion: 0
tvOSTargetOSVersion: 900
tvOSRequireExtendedGameController: 0
uIPrerenderedIcon: 0
uIRequiresPersistentWiFi: 0
uIRequiresFullScreen: 1
@ -162,6 +163,7 @@ PlayerSettings:
iOSLaunchScreeniPadCustomXibPath:
iOSDeviceRequirements: []
iOSURLSchemes: []
appleDeveloperTeamID:
AndroidTargetDevice: 0
AndroidSplashScreenScale: 0
androidSplashScreen: {fileID: 0}
@ -206,12 +208,15 @@ PlayerSettings:
wiiUSystemHeapSize: 128
wiiUTVStartupScreen: {fileID: 0}
wiiUGamePadStartupScreen: {fileID: 0}
wiiUDrcBufferDisabled: 0
wiiUProfilerLibPath:
actionOnDotNetUnhandledException: 1
enableInternalProfiler: 0
logObjCUncaughtExceptions: 1
enableCrashReportAPI: 0
cameraUsageDescription:
locationUsageDescription:
microphoneUsageDescription:
XboxTitleId:
XboxImageXexPath:
XboxSpaPath:
@ -251,7 +256,8 @@ PlayerSettings:
ps4AppType: 0
ps4ParamSfxPath:
ps4VideoOutPixelFormat: 0
ps4VideoOutResolution: 4
ps4VideoOutInitialWidth: 1920
ps4VideoOutReprojectionRate: 120
ps4PronunciationXMLPath:
ps4PronunciationSIGPath:
ps4BackgroundImagePath:
@ -280,9 +286,12 @@ PlayerSettings:
ps4pnFriends: 1
ps4pnGameCustomData: 1
playerPrefsSupport: 0
ps4UseResolutionFallback: 0
restrictedAudioUsageRights: 0
ps4ReprojectionSupport: 0
ps4UseAudio3dBackend: 0
ps4SocialScreenEnabled: 0
ps4ScriptOptimizationLevel: 3
ps4Audio3dVirtualSpeakerCount: 14
ps4attribCpuUsage: 0
ps4PatchPkgPath:

2
ProjectSettings/ProjectVersion.txt

@ -1,2 +1,2 @@
m_EditorVersion: 5.4.1f1
m_EditorVersion: 5.4.2f2
m_StandardAssetsVersion: 0

Loading…
Cancel
Save