forked from Unity-Technologies/UnityCsReference
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBuildService.cs
More file actions
62 lines (53 loc) · 2.07 KB
/
Copy pathBuildService.cs
File metadata and controls
62 lines (53 loc) · 2.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
// Unity C# reference source
// Copyright (c) Unity Technologies. For terms of use, see
// https://unity3d.com/legal/licenses/Unity_Reference_Only_License
using UnityEngine;
using System;
namespace UnityEditor.Connect
{
[InitializeOnLoad]
internal class BuildService : SingleService
{
public override string name { get; }
public override string title { get; }
public override string description { get; }
public override string pathTowardIcon { get; }
public override string projectSettingsPath { get; }
public override string settingsProviderClassName => nameof(CloudBuildProjectSettings);
public override bool displayToggle { get; }
public override Notification.Topic notificationTopic => Notification.Topic.BuildService;
public override string packageName { get; }
public override string serviceFlagName { get; }
public override bool shouldSyncOnProjectRebind => true;
static readonly BuildService k_Instance;
public static BuildService instance => k_Instance;
static BuildService()
{
k_Instance = new BuildService();
}
struct BuildServiceState
{
public bool build;
}
BuildService()
{
name = "Build";
title = L10n.Tr("Cloud Build");
description = L10n.Tr("Build games faster");
pathTowardIcon = @"Builtin Skins\Shared\Images\ServicesWindow-ServiceIcon-Build.png";
projectSettingsPath = "Project/Services/Cloud Build";
displayToggle = true;
packageName = null;
serviceFlagName = "build";
ServicesRepository.AddService(this);
}
protected override void InternalEnableService(bool enable, bool shouldUpdateApiFlag)
{
if (IsServiceEnabled() != enable)
{
EditorAnalytics.SendEventServiceInfo(new BuildServiceState() { build = enable });
}
base.InternalEnableService(enable, shouldUpdateApiFlag);
}
}
}