Browse Source

Merge remote-tracking branch 'snozbot/master'

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

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

@ -5,6 +5,7 @@ using UnityEngine;
using UnityEngine.UI; using UnityEngine.UI;
using System; using System;
using System.Collections; using System.Collections;
using System.Collections.Generic;
namespace Fungus namespace Fungus
{ {
@ -54,7 +55,23 @@ namespace Fungus
protected StringSubstituter stringSubstituter = new StringSubstituter(); protected StringSubstituter stringSubstituter = new StringSubstituter();
protected Writer GetWriter() // 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) if (writer != null)
{ {
@ -200,8 +217,14 @@ namespace Fungus
{ {
if (ActiveSayDialog == null) if (ActiveSayDialog == null)
{ {
// Use first Say Dialog found in the scene (if any) SayDialog sd = null;
SayDialog sd = GameObject.FindObjectOfType<SayDialog>();
// Use first active Say Dialog in the scene (if any)
if (activeSayDialogs.Count > 0)
{
sd = activeSayDialogs[0];
}
if (sd != null) if (sd != null)
{ {
ActiveSayDialog = sd; ActiveSayDialog = sd;

11
ProjectSettings/ProjectSettings.asset

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

2
ProjectSettings/ProjectVersion.txt

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

Loading…
Cancel
Save