빌드 스크립트 추가
This commit is contained in:
8
Gameton-06/Assets/Editor.meta
Normal file
8
Gameton-06/Assets/Editor.meta
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 0520addb815e26946a4b893500a08374
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
49
Gameton-06/Assets/Editor/BuildScript.cs
Normal file
49
Gameton-06/Assets/Editor/BuildScript.cs
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Linq;
|
||||||
|
using UnityEditor;
|
||||||
|
using UnityEditor.Build.Reporting;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
namespace TON
|
||||||
|
{
|
||||||
|
public class BuildScript
|
||||||
|
{
|
||||||
|
static string[] SCENES = FindEnabledEditorScenes();
|
||||||
|
|
||||||
|
static string APP_NAME = "TestBuild"; //앱이름 입력
|
||||||
|
static string TARGET_DIR = "E:/Build/"; //빌드경로 입력
|
||||||
|
|
||||||
|
[MenuItem("Build/Build Android")]
|
||||||
|
static void PerformAndroidBuild()
|
||||||
|
{
|
||||||
|
string target_dir = APP_NAME + ".apk";
|
||||||
|
PlayerSettings.keystorePass = "dlrhahdla"; //키스토어 비번 입력
|
||||||
|
PlayerSettings.keyaliasPass = "dlrhahdla"; //키스토어 비번 입력
|
||||||
|
GenericBuild(SCENES, TARGET_DIR + "/" + target_dir, BuildTargetGroup.Android, BuildTarget.Android, BuildOptions.None);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static string[] FindEnabledEditorScenes()
|
||||||
|
{
|
||||||
|
List<string> EditorScenes = new List<string>();
|
||||||
|
foreach (EditorBuildSettingsScene scene in EditorBuildSettings.scenes)
|
||||||
|
{
|
||||||
|
if (!scene.enabled) continue;
|
||||||
|
EditorScenes.Add(scene.path);
|
||||||
|
}
|
||||||
|
return EditorScenes.ToArray();
|
||||||
|
}
|
||||||
|
|
||||||
|
static void GenericBuild(string[] scenes, string target_dir, BuildTargetGroup build_target_group, BuildTarget build_target, BuildOptions build_options)
|
||||||
|
{
|
||||||
|
EditorUserBuildSettings.SwitchActiveBuildTarget(build_target_group, build_target);
|
||||||
|
string res = BuildPipeline.BuildPlayer(scenes, target_dir, build_target, build_options).ToString();
|
||||||
|
|
||||||
|
if (res.Length < 0)
|
||||||
|
{
|
||||||
|
throw new Exception("BuildPlayer failure: " + res);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
11
Gameton-06/Assets/Editor/BuildScript.cs.meta
Normal file
11
Gameton-06/Assets/Editor/BuildScript.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 5b41a1a0b12f28d4c9b65acaefd7c1f2
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@@ -8,7 +8,8 @@ namespace TON
|
|||||||
public class RoulettePresenter : MonoBehaviour
|
public class RoulettePresenter : MonoBehaviour
|
||||||
{
|
{
|
||||||
private PlayerDataManager playerDataManager;
|
private PlayerDataManager playerDataManager;
|
||||||
|
// ReactiveProperty
|
||||||
|
|
||||||
private void Awake()
|
private void Awake()
|
||||||
{
|
{
|
||||||
// 싱글톤으로 PlayerDataManager 접근
|
// 싱글톤으로 PlayerDataManager 접근
|
||||||
@@ -18,6 +19,8 @@ namespace TON
|
|||||||
{
|
{
|
||||||
Debug.LogError("PlayerDataManager가 초기화되지 않았습니다.");
|
Debug.LogError("PlayerDataManager가 초기화되지 않았습니다.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Todo : UI 바인딩
|
||||||
}
|
}
|
||||||
|
|
||||||
// 재화 획득 메서드
|
// 재화 획득 메서드
|
||||||
|
|||||||
@@ -5,12 +5,14 @@ using UnityEngine.UI;
|
|||||||
|
|
||||||
namespace TON
|
namespace TON
|
||||||
{
|
{
|
||||||
|
// View
|
||||||
public class RouletteSpin : MonoBehaviour
|
public class RouletteSpin : MonoBehaviour
|
||||||
{
|
{
|
||||||
[SerializeField] private Roulette roulette;
|
[SerializeField] private Roulette roulette;
|
||||||
[SerializeField] private Button buttonSpin;
|
[SerializeField] private Button buttonSpin;
|
||||||
|
|
||||||
private PlayerDataManager playerDataManager;
|
private PlayerDataManager playerDataManager;
|
||||||
|
// Todo : Presenter 변수
|
||||||
|
|
||||||
private void Awake()
|
private void Awake()
|
||||||
{
|
{
|
||||||
@@ -27,6 +29,8 @@ namespace TON
|
|||||||
buttonSpin.interactable = false;
|
buttonSpin.interactable = false;
|
||||||
roulette.Spin(EndOfSpin);
|
roulette.Spin(EndOfSpin);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Presenter 생성
|
||||||
}
|
}
|
||||||
|
|
||||||
private void EndOfSpin(RoulettePieceData selectedData)
|
private void EndOfSpin(RoulettePieceData selectedData)
|
||||||
|
|||||||
Reference in New Issue
Block a user