Skip to content

Commit

Permalink
Added support for Unity 4.7
Browse files Browse the repository at this point in the history
  • Loading branch information
weeeBox committed Mar 7, 2016
1 parent fd3eff4 commit e34596c
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 139 deletions.
2 changes: 1 addition & 1 deletion Project/Assets/Editor/Lunar/Core/EditorSceneKeyHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ static class EditorSceneKeyHandler
static EditorSceneKeyHandler()
{
KeyCode lastKeyCode;
#if UNITY_4_6
#if UNITY_4_7 || UNITY_4_6 || UNITY_4_5 || UNITY_4_4 || UNITY_4_3 || UNITY_4_2 || UNITY_4_1 || UNITY_4
lastKeyCode = KeyCode.Joystick4Button19;
#else
lastKeyCode = KeyCode.Joystick8Button19;
Expand Down
2 changes: 1 addition & 1 deletion Project/Assets/Editor/Lunar/UI/Link.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ protected override void DrawGUI()
}
EndGroup();

#if !UNITY_4_6
#if !(UNITY_4_7 || UNITY_4_6 || UNITY_4_5 || UNITY_4_4 || UNITY_4_3 || UNITY_4_2 || UNITY_4_1 || UNITY_4)
Rect linkFrame = this.Frame;
linkFrame.height = this.Style.font.ascent;
UIHelper.DrawUnderLine(linkFrame, this.Style.normal.textColor);
Expand Down
4 changes: 2 additions & 2 deletions Project/Assets/Editor/Lunar/UI/TextField.cs
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ public int CaretPos
get
{
TextEditor editor = (TextEditor) GUIUtility.GetStateObject(typeof(TextEditor), GUIUtility.keyboardControl);
#if UNITY_5_1 || UNITY_5_0 || UNITY_4_6
#if UNITY_5_1 || UNITY_5_0 || UNITY_4_7 || UNITY_4_6 || UNITY_4_5 || UNITY_4_4 || UNITY_4_3 || UNITY_4_2 || UNITY_4_1 || UNITY_4
return editor.pos;
#else
return editor.cursorIndex;
Expand All @@ -252,7 +252,7 @@ public int CaretPos
TextEditor editor = (TextEditor) GUIUtility.GetStateObject(typeof(TextEditor), GUIUtility.keyboardControl);

int pos = Mathf.Max(0, Mathf.Min(value, Text.Length + 1));
#if UNITY_5_1 || UNITY_5_0 || UNITY_4_6
#if UNITY_5_1 || UNITY_5_0 || UNITY_4_7 || UNITY_4_6 || UNITY_4_5 || UNITY_4_4 || UNITY_4_3 || UNITY_4_2 || UNITY_4_1 || UNITY_4
editor.selectPos = pos;
editor.pos = pos;
#else
Expand Down
2 changes: 1 addition & 1 deletion Project/Assets/Editor/Lunar/UI/UIHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public static void DrawUnderLine(Rect rect, Color color)

public static void DrawUnderLine(Rect rect, GUIStyle style)
{
#if !UNITY_4_6
#if !(UNITY_4_7 || UNITY_4_6 || UNITY_4_5 || UNITY_4_4 || UNITY_4_3 || UNITY_4_2 || UNITY_4_1 || UNITY_4)
Rect pos = new Rect(rect.x, rect.y + style.font.ascent, rect.width, 0.5f);
Texture2D tex = Create1x1ColorTexture(style.normal.textColor);
GUI.DrawTexture(pos, tex);
Expand Down
4 changes: 2 additions & 2 deletions Project/Assets/Editor/Lunar/Util/GameObjectUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public static IList<GameObject> ListGameObjects(GameObjectFilter filter)
return list;
}

#if !UNITY_4_6
#if !(UNITY_4_7 || UNITY_4_6 || UNITY_4_5 || UNITY_4_4 || UNITY_4_3 || UNITY_4_2 || UNITY_4_1 || UNITY_4)
public static IList<GameObject> ListChildren(string name, GameObjectFilter filter)
{
GameObject obj = GameObject.Find(name);
Expand All @@ -69,7 +69,7 @@ public static IList<GameObject> ListChildren(GameObject obj, GameObjectFilter fi

return list;
}
#endif // !UNITY_4_6
#endif // !(UNITY_4_7 || UNITY_4_6 || UNITY_4_5 || UNITY_4_4 || UNITY_4_3 || UNITY_4_2 || UNITY_4_1 || UNITY_4)

public static bool ShouldListObject(GameObject obj, string prefix)
{
Expand Down
2 changes: 1 addition & 1 deletion Project/Assets/Plugins/Lunar/Debug/Log.cs
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ static Log()
[System.Diagnostics.Conditional("LUNAR_DEVELOPMENT")]
public static void Initialize()
{
#if UNITY_4_6 || UNITY_4_5 || UNITY_4_4 || UNITY_4_3 || UNITY_4_2 || UNITY_4_1 || UNITY_4
#if UNITY_4_7 || UNITY_4_6 || UNITY_4_5 || UNITY_4_4 || UNITY_4_3 || UNITY_4_2 || UNITY_4_1 || UNITY_4
UnityEngine.Application.RegisterLogCallback(UnityLogCallbackHandler);
#else
UnityEngine.Application.logMessageReceived += UnityLogCallbackHandler;
Expand Down
151 changes: 20 additions & 131 deletions Project/ProjectSettings/ProjectSettings.asset
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
--- !u!129 &1
PlayerSettings:
m_ObjectHideFlags: 0
serializedVersion: 6
serializedVersion: 3
AndroidProfiler: 0
defaultScreenOrientation: 4
targetDevice: 2
Expand All @@ -13,7 +13,6 @@ PlayerSettings:
accelerometerFrequency: 60
companyName: Space Madness
productName: Project
cloudProjectId:
defaultCursor: {fileID: 0}
cursorHotspot: {x: 0, y: 0}
defaultScreenWidth: 1024
Expand All @@ -29,24 +28,23 @@ PlayerSettings:
m_Stereoscopic3D: 0
iosShowActivityIndicatorOnLoading: -1
androidShowActivityIndicatorOnLoading: -1
iosAppInBackgroundBehavior: 0
displayResolutionDialog: 1
allowedAutorotateToPortrait: 1
allowedAutorotateToPortraitUpsideDown: 1
allowedAutorotateToLandscapeRight: 1
allowedAutorotateToLandscapeLeft: 1
useOSAutorotation: 1
use32BitDisplayBuffer: 1
disableDepthAndStencilBuffers: 0
use24BitDepthBuffer: 1
defaultIsFullScreen: 1
defaultIsNativeResolution: 1
runInBackground: 1
captureSingleScreen: 0
Override IPod Music: 0
Prepare IOS For Recording: 0
submitAnalytics: 1
enableHWStatistics: 1
usePlayerLog: 1
bakeCollisionMeshes: 0
stripPhysics: 0
forceSingleInstance: 0
resizableWindow: 0
useMacAppStoreValidation: 0
Expand All @@ -59,28 +57,23 @@ PlayerSettings:
visibleInBackground: 0
macFullscreenMode: 2
d3d9FullscreenMode: 1
d3d11FullscreenMode: 1
d3d11ForceExclusiveMode: 0
xboxSpeechDB: 0
xboxEnableHeadOrientation: 0
xboxEnableGuest: 0
xboxOneResolution: 0
ps3SplashScreen: {fileID: 0}
videoMemoryForVertexBuffers: 0
psp2PowerMode: 0
psp2AcquireBGM: 1
m_SupportedAspectRatios:
4:3: 1
5:4: 1
16:10: 1
16:9: 1
Others: 1
bundleIdentifier: com.bc.test
bundleVersion: 1.0
preloadedAssets: []
iPhoneBundleIdentifier: com.Company.ProductName
metroEnableIndependentInputSource: 0
metroEnableLowLatencyPresentationAPI: 0
xboxOneDisableKinectGpuReservation: 0
productGUID: 6b7c9cddfe3a31a4faae5d4b16f7e1e4
iPhoneBundleVersion: 1.0
iPhoneShortBundleVersion: 1.0
AndroidBundleVersionCode: 1
AndroidMinSdkVersion: 9
AndroidPreferredInstallLocation: 1
Expand All @@ -92,7 +85,6 @@ PlayerSettings:
ForceSDCardPermission: 0
CreateWallpaper: 0
APKExpansionFiles: 0
preloadShaders: 0
StripUnusedMeshComponents: 0
iPhoneSdkVersion: 988
iPhoneTargetOSVersion: 22
Expand All @@ -118,18 +110,12 @@ PlayerSettings:
serializedVersion: 2
rgba: 0
iOSLaunchScreenFillPct: 1
iOSLaunchScreenSize: 100
iOSLaunchScreenCustomXibPath:
AndroidTargetDevice: 0
AndroidSplashScreenScale: 0
AndroidKeystoreName:
AndroidKeyaliasName:
AndroidTVCompatibility: 1
AndroidIsGame: 1
androidEnableBanner: 1
m_AndroidBanners:
- width: 320
height: 180
banner: {fileID: 0}
resolutionDialogBanner: {fileID: 0}
m_BuildTargetIcons:
- m_BuildTarget:
Expand All @@ -139,10 +125,6 @@ PlayerSettings:
m_BuildTargetBatching: []
webPlayerTemplate: APPLICATION:Default
m_TemplateCustomTags: {}
actionOnDotNetUnhandledException: 1
enableInternalProfiler: 0
logObjCUncaughtExceptions: 1
enableCrashReportAPI: 0
locationUsageDescription:
XboxTitleId:
XboxImageXexPath:
Expand All @@ -159,97 +141,30 @@ PlayerSettings:
ps3ThumbnailPath:
ps3BackgroundPath:
ps3SoundPath:
ps3NPAgeRating: 12
ps3TrophyCommId:
ps3NpCommunicationPassphrase:
ps3TrophyPackagePath:
ps3BootCheckMaxSaveGameSizeKB: 128
ps3TrophyCommSig:
ps3SaveGameSlots: 1
ps3TrialMode: 0
ps3VideoMemoryForAudio: 0
ps3EnableVerboseMemoryStats: 0
ps3UseSPUForUmbra: 0
ps3EnableMoveSupport: 1
ps3DisableDolbyEncoding: 0
ps4NPAgeRating: 12
ps4NPTitleSecret:
ps4NPTrophyPackPath:
ps4ParentalLevel: 1
ps4ContentID: ED1633-NPXX51362_00-0000000000000000
ps4Category: 0
ps4MasterVersion: 01.00
ps4AppVersion: 01.00
ps4AppType: 0
ps4ParamSfxPath:
ps4VideoOutPixelFormat: 0
ps4VideoOutResolution: 4
ps4PronunciationXMLPath:
ps4PronunciationSIGPath:
ps4BackgroundImagePath:
ps4StartupImagePath:
ps4SaveDataImagePath:
ps4BGMPath:
ps4ShareFilePath:
ps4NPtitleDatPath:
ps4RemotePlayKeyAssignment: -1
ps4EnterButtonAssignment: 1
ps4ApplicationParam1: 0
ps4ApplicationParam2: 0
ps4ApplicationParam3: 0
ps4ApplicationParam4: 0
ps4Passcode: Q5zm1VO2zwh0oSZGvMnqhk3fhfwAVqif
ps4pnSessions: 1
ps4pnPresence: 1
ps4pnFriends: 1
ps4pnGameCustomData: 1
playerPrefsSupport: 0
monoEnv:
psp2Splashimage: {fileID: 0}
psp2LiveAreaGate: {fileID: 0}
psp2LiveAreaBackround: {fileID: 0}
psp2NPTrophyPackPath:
psp2NPSupportGBMorGJP: 0
psp2NPAgeRating: 12
psp2NPCommsID:
psp2NPCommunicationsID:
psp2NPCommsPassphrase:
psp2NPCommsSig:
psp2ParamSfxPath:
psp2ManualPath:
psp2LiveAreaGatePath:
psp2LiveAreaBackroundPath:
psp2LiveAreaPath:
psp2LiveAreaTrialPath:
psp2PatchChangeInfoPath:
psp2PatchOriginalPackage:
psp2PackagePassword:
psp2KeystoneFile:
psp2DRMType: 0
psp2StorageType: 0
psp2MediaCapacity: 0
psp2DLCConfigPath:
psp2ThumbnailPath:
psp2BackgroundPath:
psp2SoundPath:
psp2TrophyCommId:
psp2TrophyPackagePath:
psp2PackagedResourcesPath:
psp2SaveDataQuota: 10240
psp2ParentalLevel: 1
psp2ShortTitle: Not Set
psp2ContentID: IV0000-ABCD12345_00-0123456789ABCDEF
psp2Category: 0
psp2MasterVersion: 01.00
psp2AppVersion: 01.00
psp2TVBootMode: 0
psp2EnterButtonAssignment: 2
psp2TVDisableEmu: 0
psp2AllowTwitterDialog: 1
psp2Upgradable: 0
psp2HealthWarning: 0
psp2UseLibLocation: 0
psp2InfoBarOnStartup: 0
psp2InfoBarColor: 0
psmSplashimage: {fileID: 0}
flashStrippingLevel: 2
spritePackerPolicy:
scriptingDefineSymbols:
1: LUNAR_DEVELOPMENT;LUNAR_DEBUG
Expand Down Expand Up @@ -318,19 +233,19 @@ PlayerSettings:
metroTileBackgroundColor: {r: 0, g: 0, b: 0, a: 1}
metroSplashScreenBackgroundColor: {r: 0, g: 0, b: 0, a: 1}
metroSplashScreenUseBackgroundColor: 0
platformCapabilities: {}
metroFTAName:
metroFTAFileTypes: []
metroProtocolName:
metroCapabilities: {}
metroUnprocessedPlugins: []
metroCompilationOverrides: 1
blackberryDeviceAddress:
blackberryDevicePassword:
blackberryTokenPath:
blackberryTokenExires:
blackberryTokenAuthor:
blackberryTokenAuthorId:
blackberryAuthorId:
blackberryCskPassword:
blackberrySaveLogPath:
blackberryAuthorIdOveride: 0
blackberrySharedPermissions: 0
blackberryCameraPermissions: 0
blackberryGPSPermissions: 0
Expand All @@ -348,28 +263,7 @@ PlayerSettings:
tizenGPSPermissions: 0
tizenMicrophonePermissions: 0
stvDeviceAddress:
stvProductDescription:
stvProductAuthor:
stvProductAuthorEmail:
stvProductLink:
stvProductCategory: 0
XboxOneProductId:
XboxOneUpdateKey:
XboxOneSandboxId:
XboxOneContentId:
XboxOneTitleId:
XboxOneSCId:
XboxOneGameOsOverridePath:
XboxOnePackagingOverridePath:
XboxOneAppManifestOverridePath:
XboxOnePackageEncryption: 0
XboxOneDescription:
XboxOneIsContentPackage: 0
XboxOneEnableGPUVariability: 0
XboxOneSockets: {}
XboxOneSplashScreen: {fileID: 0}
XboxOneAllowedProductIds: []
XboxOnePersistentLocalStorageSize: 0
wp8UnprocessedPlugins: []
intPropertyNames:
- WebGL::ScriptingBackend
- WebGL::audioCompressionFormat
Expand All @@ -383,12 +277,7 @@ PlayerSettings:
WebGL::memorySize: 256
iOS::Architecture: 2
iOS::ScriptingBackend: 0
boolPropertyNames:
- WebGL::dataCaching
WebGL::dataCaching: 0
stringPropertyNames:
- WebGL::emscriptenArgs
- WebGL::template
WebGL::emscriptenArgs:
WebGL::template: APPLICATION:Default
firstStreamedLevelWithResources: 0
unityRebuildLibraryVersion: 9
unityForwardCompatibleVersion: 39
unityStandardAssetsVersion: 0

0 comments on commit e34596c

Please sign in to comment.