Skip to content

Commit

Permalink
Changed to not complain when changing between 64 bit and 32 bit windo…
Browse files Browse the repository at this point in the history
…ws and also added an option to default to 64 bit (re issue #61)
  • Loading branch information
svermeulen committed May 24, 2017
1 parent 301bbf6 commit 2fde99f
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
3 changes: 3 additions & 0 deletions Source/mtm/util/UnityHelper.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ class UnityHelper:
_sys = Inject('SystemHelper')
_varMgr = Inject('VarManager')
_commonSettings = Inject('CommonSettings')
_config = Inject('Config')

def __init__(self):
pass
Expand Down Expand Up @@ -56,6 +57,8 @@ def openUnity(self, projectName, platform):
def _getBuildTargetArg(self, platform):

if platform == Platforms.Windows:
if self._config.tryGetBool(False, 'Unity', 'Win64IsDefault'):
return 'win64'
return 'win32'

if platform == Platforms.WebPlayer:
Expand Down
1 change: 1 addition & 0 deletions UnityPlugin/Projeny/Main/PrjInterface.cs
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,7 @@ static string ToPlatformDirStr(BuildTarget platform)
{
switch (platform)
{
case BuildTarget.StandaloneWindows64:
case BuildTarget.StandaloneWindows:
{
return "windows";
Expand Down
9 changes: 8 additions & 1 deletion UnityPlugin/Projeny/Main/ProjenyConfigValidator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,15 @@ static void VerifyPlatformIsCorrect()
var info = ProjenyEditorUtil.GetCurrentProjectInfo();

var expectedPlatform = ProjenyEditorUtil.FromPlatformDirStr(info.PlatformDirName);
var currentPlatform = EditorUserBuildSettings.activeBuildTarget;

if (EditorUserBuildSettings.activeBuildTarget != expectedPlatform)
if ((expectedPlatform == BuildTarget.StandaloneWindows || expectedPlatform == BuildTarget.StandaloneWindows64)
&& (currentPlatform == BuildTarget.StandaloneWindows || currentPlatform == BuildTarget.StandaloneWindows64))
{
return;
}

if (currentPlatform != expectedPlatform)
{
if (EditorUserBuildSettings.SwitchActiveBuildTarget(expectedPlatform))
{
Expand Down

0 comments on commit 2fde99f

Please sign in to comment.