@ -1 +1 @@
|
||||
<app-unity></app-unity> |
||||
<!-- <app-unity></app-unity> --> |
@ -1,3 +0,0 @@
|
||||
<div class="webgl-content"> |
||||
<div id="unityContainer"></div> |
||||
</div> |
@ -1,4 +0,0 @@
|
||||
#unityContainer{ |
||||
width: 100%; |
||||
height: 100%; |
||||
} |
@ -1,25 +0,0 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing'; |
||||
|
||||
import { UnityComponent } from './unity.component'; |
||||
|
||||
describe('UnityComponent', () => { |
||||
let component: UnityComponent; |
||||
let fixture: ComponentFixture<UnityComponent>; |
||||
|
||||
beforeEach(async(() => { |
||||
TestBed.configureTestingModule({ |
||||
declarations: [ UnityComponent ] |
||||
}) |
||||
.compileComponents(); |
||||
})); |
||||
|
||||
beforeEach(() => { |
||||
fixture = TestBed.createComponent(UnityComponent); |
||||
component = fixture.componentInstance; |
||||
fixture.detectChanges(); |
||||
}); |
||||
|
||||
it('should create', () => { |
||||
expect(component).toBeTruthy(); |
||||
}); |
||||
}); |
@ -1,59 +0,0 @@
|
||||
import { Component, OnInit } from '@angular/core'; |
||||
|
||||
declare var UnityLoader: any; |
||||
declare var window: Window & { getCookie: any }; |
||||
|
||||
@Component({ |
||||
selector: 'app-unity', |
||||
templateUrl: './unity.component.html', |
||||
styleUrls: ['./unity.component.scss'] |
||||
}) |
||||
|
||||
|
||||
|
||||
export class UnityComponent implements OnInit { |
||||
|
||||
public unityInstance: any = {}; |
||||
|
||||
constructor() { |
||||
//window.getCookie = this.getCookie.bind(this);
|
||||
} |
||||
|
||||
// progressValue = 0;
|
||||
|
||||
ngOnInit(): void { |
||||
this.unityInstance = UnityLoader.instantiate('unityContainer', 'assets/unityApp/Build/unityApp.json'); |
||||
//this.progressValue = 50;
|
||||
|
||||
} |
||||
// ngAfterViewInit ( ): void {
|
||||
|
||||
// }
|
||||
// ///
|
||||
// UnityProgress(unityInstance, progress) {
|
||||
// if (!unityInstance.Module)
|
||||
// return;
|
||||
|
||||
// this.progressValue = 100;
|
||||
// console.log(this.progressValue);
|
||||
|
||||
// if (progress == 1)
|
||||
|
||||
// unityInstance.SendMessage("GameManager", "ShowMainView");
|
||||
// }
|
||||
|
||||
// //发送单位id
|
||||
// sendCompanyId(){
|
||||
// var companyId = sessionStorage.getItem('companyId');
|
||||
// this.unityInstance.SendMessage("GameManager","SetCompanyId",)
|
||||
// }
|
||||
|
||||
// CallUnity(): void {
|
||||
|
||||
// console.log('修改progressValue的值为'+this.progressValue);
|
||||
// }
|
||||
|
||||
// public SendMessage(objectName: string, methodName: string): void {
|
||||
// this.unityInstance.SendMessage(objectName, methodName);
|
||||
// }
|
||||
} |
Before Width: | Height: | Size: 155 B |
Before Width: | Height: | Size: 137 B |
@ -1,16 +0,0 @@
|
||||
{ |
||||
"companyName": "DefaultCompany", |
||||
"productName": "2DPlanMakingTool", |
||||
"productVersion": "0.1", |
||||
"dataUrl": "unityApp.data.unityweb", |
||||
"wasmCodeUrl": "unityApp.wasm.code.unityweb", |
||||
"wasmFrameworkUrl": "unityApp.wasm.framework.unityweb", |
||||
"graphicsAPI": ["WebGL 2.0","WebGL 1.0"], |
||||
"webglContextAttributes": {"preserveDrawingBuffer": false}, |
||||
"splashScreenStyle": "Dark", |
||||
"backgroundColor": "#231F20", |
||||
"cacheControl": {"default": "must-revalidate"}, |
||||
"developmentBuild": false, |
||||
"multithreading": false, |
||||
"unityVersion": "2019.3.2f1" |
||||
} |
Before Width: | Height: | Size: 1.7 MiB |
@ -1,114 +0,0 @@
|
||||
<linker> |
||||
<assembly fullname="UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null"> |
||||
<type fullname="UnityEngine.GameObject" preserve="all" /> |
||||
<type fullname="UnityEngine.Material" preserve="all" /> |
||||
<type fullname="UnityEngine.Texture2D" preserve="all" /> |
||||
<type fullname="UnityEngine.Sprite" preserve="all" /> |
||||
<type fullname="UnityEngine.RectTransform" preserve="all" /> |
||||
<type fullname="UnityEngine.U2D.SpriteAtlas" preserve="all" /> |
||||
</assembly> |
||||
<assembly fullname="UnityEngine.Physics2DModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null"> |
||||
<type fullname="UnityEngine.Rigidbody2D" preserve="all" /> |
||||
<type fullname="UnityEngine.PolygonCollider2D" preserve="all" /> |
||||
<type fullname="UnityEngine.BoxCollider2D" preserve="all" /> |
||||
<type fullname="UnityEngine.CompositeCollider2D" preserve="all" /> |
||||
</assembly> |
||||
<assembly fullname="UnityEngine.AnimationModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null"> |
||||
<type fullname="UnityEngine.AnimationClip" preserve="all" /> |
||||
<type fullname="UnityEngine.RuntimeAnimatorController" preserve="all" /> |
||||
<type fullname="UnityEngine.Animator" preserve="all" /> |
||||
</assembly> |
||||
<assembly fullname="Assembly-CSharp, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null"> |
||||
<type fullname="MultipleAssetIcon" preserve="all" /> |
||||
<type fullname="Config" preserve="all" /> |
||||
<type fullname="MessageInput" preserve="all" /> |
||||
<type fullname="MultipleClosedAssetIcon" preserve="all" /> |
||||
<type fullname="DisastersViewItemItem" preserve="all" /> |
||||
<type fullname="ColorBoard" preserve="all" /> |
||||
<type fullname="UIViewAddBuilding" preserve="all" /> |
||||
<type fullname="UIViewMain" preserve="all" /> |
||||
<type fullname="Point" preserve="all" /> |
||||
<type fullname="AssetInfoItem" preserve="all" /> |
||||
<type fullname="DropdownControl" preserve="all" /> |
||||
<type fullname="DragUGUI2" preserve="all" /> |
||||
<type fullname="TextBoxAsset" preserve="all" /> |
||||
<type fullname="ExpandViewItem" preserve="all" /> |
||||
<type fullname="ExpandViewOneOrTwoItem" preserve="all" /> |
||||
<type fullname="UIFloorControl" preserve="all" /> |
||||
<type fullname="AssetLibItem" preserve="all" /> |
||||
<type fullname="BooleanControl" preserve="all" /> |
||||
<type fullname="ExpandView" preserve="all" /> |
||||
<type fullname="FillingArea" preserve="all" /> |
||||
<type fullname="WorkingArea" preserve="all" /> |
||||
<type fullname="CanvasSampleOpenFileImage" preserve="all" /> |
||||
<type fullname="Arrows" preserve="all" /> |
||||
<type fullname="DisastersViewItem" preserve="all" /> |
||||
<type fullname="BuildingFloor" preserve="all" /> |
||||
<type fullname="SinglepointIcon" preserve="all" /> |
||||
<type fullname="ImageBrowser" preserve="all" /> |
||||
<type fullname="UIViewLoading" preserve="all" /> |
||||
<type fullname="BuildingTab" preserve="all" /> |
||||
<type fullname="UIViewMessageYesNo" preserve="all" /> |
||||
<type fullname="UIViewAddBuildingFloor" preserve="all" /> |
||||
<type fullname="XTreeView.TreeViewControl" preserve="all" /> |
||||
<type fullname="SelfAdaptionInputField" preserve="all" /> |
||||
<type fullname="Floor" preserve="all" /> |
||||
<type fullname="NewBehaviourScript" preserve="all" /> |
||||
<type fullname="AngleInputField" preserve="all" /> |
||||
<type fullname="AssetPropertiesView" preserve="all" /> |
||||
<type fullname="XTreeView.TreeViewItem" preserve="all" /> |
||||
<type fullname="SitePlanTab" preserve="all" /> |
||||
<type fullname="CustomButton" preserve="all" /> |
||||
<type fullname="SitePlanFloor" preserve="all" /> |
||||
<type fullname="InputField_WebGL" preserve="all" /> |
||||
<type fullname="MessageBox" preserve="all" /> |
||||
<type fullname="UIViewCreateBackground" preserve="all" /> |
||||
<type fullname="Line" preserve="all" /> |
||||
<type fullname="Tips" preserve="all" /> |
||||
<type fullname="SetOutline" preserve="all" /> |
||||
<type fullname="WebGLOpenFileButton" preserve="all" /> |
||||
</assembly> |
||||
<assembly fullname="UnityEngine.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"> |
||||
<type fullname="UnityEngine.UI.Text" preserve="all" /> |
||||
<type fullname="UnityEngine.UI.Scrollbar" preserve="all" /> |
||||
<type fullname="UnityEngine.UI.Image" preserve="all" /> |
||||
<type fullname="UnityEngine.UI.GridLayoutGroup" preserve="all" /> |
||||
<type fullname="UnityEngine.UI.ContentSizeFitter" preserve="all" /> |
||||
<type fullname="UnityEngine.UI.LayoutElement" preserve="all" /> |
||||
<type fullname="UnityEngine.UI.Mask" preserve="all" /> |
||||
<type fullname="UnityEngine.UI.ScrollRect" preserve="all" /> |
||||
<type fullname="UnityEngine.UI.Button" preserve="all" /> |
||||
<type fullname="UnityEngine.UI.RawImage" preserve="all" /> |
||||
<type fullname="UnityEngine.UI.VerticalLayoutGroup" preserve="all" /> |
||||
<type fullname="UnityEngine.UI.InputField" preserve="all" /> |
||||
<type fullname="UnityEngine.UI.HorizontalLayoutGroup" preserve="all" /> |
||||
<type fullname="UnityEngine.UI.Outline" preserve="all" /> |
||||
<type fullname="UnityEngine.UI.Dropdown" preserve="all" /> |
||||
<type fullname="UnityEngine.UI.Toggle" preserve="all" /> |
||||
<type fullname="UnityEngine.UI.Slider" preserve="all" /> |
||||
<type fullname="UnityEngine.UI.ToggleGroup" preserve="all" /> |
||||
</assembly> |
||||
<assembly fullname="UniRx, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null"> |
||||
<type fullname="UniRx.Triggers.ObservableDestroyTrigger" preserve="all" /> |
||||
</assembly> |
||||
<assembly fullname="UnityEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null"> |
||||
<type fullname="UnityEditor.MonoScript" preserve="all" /> |
||||
</assembly> |
||||
<assembly fullname="UnityEngine.TextRenderingModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null"> |
||||
<type fullname="UnityEngine.Font" preserve="all" /> |
||||
</assembly> |
||||
<assembly fullname="UnityEngine.UIModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null"> |
||||
<type fullname="UnityEngine.CanvasRenderer" preserve="all" /> |
||||
<type fullname="UnityEngine.CanvasGroup" preserve="all" /> |
||||
</assembly> |
||||
<assembly fullname="Unity.ResourceManager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null" preserve="all"> |
||||
<type fullname="UnityEngine.ResourceManagement.ResourceProviders.LegacyResourcesProvider" preserve="all" /> |
||||
<type fullname="UnityEngine.ResourceManagement.ResourceProviders.AssetBundleProvider" preserve="all" /> |
||||
<type fullname="UnityEngine.ResourceManagement.ResourceProviders.BundledAssetProvider" preserve="all" /> |
||||
<type fullname="UnityEngine.ResourceManagement.ResourceProviders.InstanceProvider" preserve="all" /> |
||||
<type fullname="UnityEngine.ResourceManagement.ResourceProviders.SceneProvider" preserve="all" /> |
||||
</assembly> |
||||
<assembly fullname="Unity.Addressables, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null" preserve="all"> |
||||
<type fullname="UnityEngine.AddressableAssets.Addressables" preserve="all" /> |
||||
</assembly> |
||||
</linker> |
@ -1 +0,0 @@
|
||||
{"m_buildTarget":"WebGL","m_SettingsHash":"","m_CatalogLocations":[{"m_Keys":["AddressablesMainContentCatalog"],"m_InternalId":"{UnityEngine.AddressableAssets.Addressables.RuntimePath}/catalog.json","m_Provider":"UnityEngine.AddressableAssets.ResourceProviders.ContentCatalogProvider","m_Dependencies":[],"m_ResourceType":{"m_AssemblyName":"Unity.Addressables, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null","m_ClassName":"UnityEngine.AddressableAssets.ResourceLocators.ContentCatalogData"}}],"m_ProfileEvents":false,"m_LogResourceManagerExceptions":true,"m_ExtraInitializationData":[],"m_DisableCatalogUpdateOnStart":false,"m_CertificateHandlerType":{"m_AssemblyName":"","m_ClassName":""}} |
@ -1,24 +0,0 @@
|
||||
function UnityProgress(unityInstance, progress) { |
||||
if (!unityInstance.Module) |
||||
return; |
||||
if (!unityInstance.logo) { |
||||
unityInstance.logo = document.createElement("div"); |
||||
unityInstance.logo.className = "logo " + unityInstance.Module.splashScreenStyle; |
||||
unityInstance.container.appendChild(unityInstance.logo); |
||||
} |
||||
if (!unityInstance.progress) {
|
||||
unityInstance.progress = document.createElement("div"); |
||||
unityInstance.progress.className = "progress " + unityInstance.Module.splashScreenStyle; |
||||
unityInstance.progress.empty = document.createElement("div"); |
||||
unityInstance.progress.empty.className = "empty"; |
||||
unityInstance.progress.appendChild(unityInstance.progress.empty); |
||||
unityInstance.progress.full = document.createElement("div"); |
||||
unityInstance.progress.full.className = "full"; |
||||
unityInstance.progress.appendChild(unityInstance.progress.full); |
||||
unityInstance.container.appendChild(unityInstance.progress); |
||||
} |
||||
unityInstance.progress.full.style.width = (100 * progress) + "%"; |
||||
unityInstance.progress.empty.style.width = (100 * (1 - progress)) + "%"; |
||||
if (progress == 1) |
||||
unityInstance.logo.style.display = unityInstance.progress.style.display = "none"; |
||||
} |
Before Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 345 B |
Before Width: | Height: | Size: 155 B |
Before Width: | Height: | Size: 159 B |
Before Width: | Height: | Size: 137 B |
Before Width: | Height: | Size: 142 B |
Before Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 2.2 KiB |
@ -1,18 +0,0 @@
|
||||
.webgl-content * {border: 0; margin: 0; padding: 0} |
||||
.webgl-content {position: absolute; top: 50%; left: 50%; -webkit-transform: translate(-50%, -50%); transform: translate(-50%, -50%);} |
||||
|
||||
.webgl-content .logo, .progress {position: absolute; left: 50%; top: 50%; -webkit-transform: translate(-50%, -50%); transform: translate(-50%, -50%);} |
||||
.webgl-content .logo {background: url('progressLogo.Light.png') no-repeat center / contain; width: 154px; height: 130px;} |
||||
.webgl-content .progress {height: 18px; width: 141px; margin-top: 90px;} |
||||
.webgl-content .progress .empty {background: url('progressEmpty.Light.png') no-repeat right / cover; float: right; width: 100%; height: 100%; display: inline-block;} |
||||
.webgl-content .progress .full {background: url('progressFull.Light.png') no-repeat left / cover; float: left; width: 0%; height: 100%; display: inline-block;} |
||||
|
||||
.webgl-content .logo.Dark {background-image: url('progressLogo.Dark.png');} |
||||
.webgl-content .progress.Dark .empty {background-image: url('progressEmpty.Dark.png');} |
||||
.webgl-content .progress.Dark .full {background-image: url('progressFull.Dark.png');} |
||||
|
||||
.webgl-content .footer {margin-top: 5px; height: 38px; line-height: 38px; font-family: Helvetica, Verdana, Arial, sans-serif; font-size: 18px;} |
||||
.webgl-content .footer .webgl-logo, .title, .fullscreen {height: 100%; display: inline-block; background: transparent center no-repeat;} |
||||
.webgl-content .footer .webgl-logo {background-image: url('webgl-logo.png'); width: 204px; float: left;} |
||||
.webgl-content .footer .title {margin-right: 10px; float: right;} |
||||
.webgl-content .footer .fullscreen {background-image: url('fullscreen.png'); width: 38px; float: right;} |
Before Width: | Height: | Size: 3.5 KiB |
@ -1,25 +0,0 @@
|
||||
<!DOCTYPE html> |
||||
<html lang="en-us"> |
||||
<head> |
||||
<meta charset="utf-8"> |
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
||||
<title>Unity WebGL Player | 2DPlanMakingTool</title> |
||||
<link rel="shortcut icon" href="TemplateData/favicon.ico"> |
||||
<link rel="stylesheet" href="TemplateData/style.css"> |
||||
<script src="TemplateData/UnityProgress.js"></script> |
||||
<script src="Build/UnityLoader.js"></script> |
||||
<script> |
||||
var unityInstance = UnityLoader.instantiate("unityContainer", "Build/unityApp.json", {onProgress: UnityProgress}); |
||||
</script> |
||||
</head> |
||||
<body> |
||||
<div class="webgl-content"> |
||||
<div id="unityContainer" style="width: 1024px; height: 768px"></div> |
||||
<div class="footer"> |
||||
<div class="webgl-logo"></div> |
||||
<div class="fullscreen" onclick="unityInstance.SetFullscreen(1)"></div> |
||||
<div class="title">2DPlanMakingTool</div> |
||||
</div> |
||||
</div> |
||||
</body> |
||||
</html> |