├── .gitignore
├── Assets
├── ChangeLog.meta
├── ChangeLog
│ ├── ChangeLog.txt
│ └── ChangeLog.txt.meta
├── Images.meta
├── Images
│ ├── CubeMap.meta
│ ├── CubeMap
│ │ ├── Milkyway01.tif
│ │ ├── Milkyway01.tif.meta
│ │ ├── Milkyway02.tif
│ │ ├── Milkyway02.tif.meta
│ │ ├── Milkyway03.tif
│ │ ├── Milkyway03.tif.meta
│ │ ├── Milkyway04.tif
│ │ ├── Milkyway04.tif.meta
│ │ ├── Milkyway05.tif
│ │ ├── Milkyway05.tif.meta
│ │ ├── Milkyway06.tif
│ │ ├── Milkyway06.tif.meta
│ │ ├── Thumbs.db
│ │ └── Thumbs.db.meta
│ ├── HexGrid-Civ5-Hexagons-24x24_2.gif
│ ├── HexGrid-Civ5-Hexagons-24x24_2.gif.meta
│ ├── Icons.meta
│ ├── Icons
│ │ ├── Materials.meta
│ │ ├── Materials
│ │ │ ├── TempStarIcon.mat
│ │ │ └── TempStarIcon.mat.meta
│ │ ├── TempStarIcon.png
│ │ └── TempStarIcon.png.meta
│ ├── UI Elements.meta
│ └── UI Elements
│ │ ├── Border.tif
│ │ ├── Border.tif.meta
│ │ ├── SF Background.jpg
│ │ ├── SF Background.jpg.meta
│ │ ├── SF Button.psd
│ │ ├── SF Button.psd.meta
│ │ ├── SF Title.psd
│ │ ├── SF Title.psd.meta
│ │ ├── SF Window.psd
│ │ └── SF Window.psd.meta
├── Materials.meta
├── Materials
│ ├── Line.mat
│ ├── Line.mat.meta
│ ├── Milkyway.mat
│ ├── Milkyway.mat.meta
│ ├── Plane.mat
│ ├── Plane.mat.meta
│ ├── Star.mat
│ └── Star.mat.meta
├── Prefabs.meta
├── Prefabs
│ ├── Star Label.prefab
│ ├── Star Label.prefab.meta
│ ├── Star.prefab
│ └── Star.prefab.meta
├── Raw Star Data.meta
├── Scripts.meta
├── Scripts
│ ├── CameraLookAt.cs
│ ├── CameraLookAt.cs.meta
│ ├── DataController.cs
│ ├── DataController.cs.meta
│ ├── GlobalDefinitions.cs
│ ├── GlobalDefinitions.cs.meta
│ ├── HUDController.cs
│ ├── HUDController.cs.meta
│ ├── LabelPool.cs
│ ├── LabelPool.cs.meta
│ ├── MapController.cs
│ ├── MapController.cs.meta
│ ├── SetTarget.cs
│ ├── SetTarget.cs.meta
│ ├── Star.cs
│ ├── Star.cs.meta
│ ├── UI Scripts.meta
│ └── UI Scripts
│ │ ├── SetInputFieldValue.cs
│ │ ├── SetInputFieldValue.cs.meta
│ │ ├── SetSliderValue.cs
│ │ ├── SetSliderValue.cs.meta
│ │ ├── TogglePanel.cs
│ │ ├── TogglePanel.cs.meta
│ │ ├── UIController.cs
│ │ └── UIController.cs.meta
├── StarData_20190314.json
├── StarData_20190314.json.meta
├── Typefaces.meta
├── Typefaces
│ ├── Michroma.ttf
│ ├── Michroma.ttf.meta
│ ├── Roboto-Regular.ttf
│ ├── Roboto-Regular.ttf.meta
│ ├── frau.ttf
│ └── frau.ttf.meta
├── WebplayerTemplates.meta
├── WebplayerTemplates
│ ├── Billboard.cs
│ ├── Billboard.cs.meta
│ ├── TempStarLabel.cs
│ └── TempStarLabel.cs.meta
├── _Scenes.meta
└── _Scenes
│ ├── Main.unity
│ └── Main.unity.meta
├── Images
└── DemoScene.png
├── LICENSE
├── ProjectSettings
├── AudioManager.asset
├── ClusterInputManager.asset
├── DynamicsManager.asset
├── EditorBuildSettings.asset
├── EditorSettings.asset
├── GraphicsSettings.asset
├── InputManager.asset
├── NavMeshAreas.asset
├── NavMeshLayers.asset
├── NetworkManager.asset
├── Physics2DSettings.asset
├── PresetManager.asset
├── ProjectSettings.asset
├── ProjectVersion.txt
├── QualitySettings.asset
├── TagManager.asset
├── TimeManager.asset
├── UnityConnectSettings.asset
└── VFXManager.asset
└── README.md
/.gitignore:
--------------------------------------------------------------------------------
1 | [Ll]ibrary/
2 | [Tt]emp/
3 | [Oo]bj/
4 | [Bb]uild/
5 | [Bb]uilds/
6 | Assets/AssetStoreTools*
7 |
8 | # Visual Studio cache directory
9 | .vs/
10 |
11 | # Autogenerated VS/MD/Consulo solution and project files
12 | ExportedObj/
13 | .consulo/
14 | *.csproj
15 | *.unityproj
16 | *.sln
17 | *.suo
18 | *.tmp
19 | *.user
20 | *.userprefs
21 | *.pidb
22 | *.booproj
23 | *.svd
24 | *.pdb
25 | *.opendb
26 |
27 | # Unity3D generated meta files
28 | *.pidb.meta
29 | *.pdb.meta
30 |
31 | # Unity3D Generated File On Crash Reports
32 | sysinfo.txt
33 |
34 | # Builds
35 | *.apk
36 | *.unitypackage
37 |
--------------------------------------------------------------------------------
/Assets/ChangeLog.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 2bbb94540d2884f339e23def98b25128
3 | folderAsset: yes
4 | DefaultImporter:
5 | userData:
6 |
--------------------------------------------------------------------------------
/Assets/ChangeLog/ChangeLog.txt:
--------------------------------------------------------------------------------
1 | Change Log:
2 |
3 | 1.04
4 | Initial Commit
5 |
6 | 1.05
7 | Updates
8 | (Failed) Move Labels to ScreenSpace
9 |
10 | 1.06
11 | Changed the Camera's Clamp Distace to V2 (5, 50)
12 | (Failed) Update to prevent UI Events working the camera (slider)
13 | Added basic line renderers to show connections
14 | Updated System Information Graphic for denser BG & Border
15 | Moved Labels into Screen Space
16 | (Much much better performance!)
17 | Increased Jump Range to 20, just in case...
18 | Changed color of Jump Lines to a Sea Green
19 |
20 | 1.07
21 | Updated star list to @700+ stars (with new origin point)
22 |
23 | 1.08
24 | Changed typeface for the stars to Google's Eurostyle-like "Michroma"
25 | Changed the Camera's Clamp Distance to V2 (10, 50)
26 | Changed starting distance to 15
27 | Changed Camera's FOV to 45
28 | Changed MapController.LabelOffset to V3 (0, 5, 0)
29 | Changed MapController.ClampViewDistance to V2 (15, 55)
30 | Added "Star Size" variable to Map Controller for better control over the stars
31 | Changed MapController.starSize from 1.0 to 0.5
32 | Created persistent Camera Target to move in the scene for the camera to track
33 | Added the ability to Pan & Dolly within the star volume
34 | Created stub for setting star data
35 | Fixed and Optimized jump distance lines
36 | (including: Make jump lines recalculate on slider change)
37 |
38 | 1.09
39 | Added slot in PlayerPrefs to save last known star to maintain last seleted location.
40 | Changed from using "transform.position" to "Vector3 star.coordinates"
41 | Removed Preinstantiated Target Object
42 | CameraLookAt now generates it's own target
43 | Setup Buttons for "Allegiance, Economy, Government & Black Market"
44 | Changed Button Typeface to Microma
45 | Created stub panel for "Allegiance Button"
46 | abandoned this due to not being able to shift the pivot
47 | Added Roboto Typeface, but probably won't use it
48 |
49 | 1.10
50 | Made the base panel for the "Allegiance", "Economy" & "Government" Buttons
51 | including functional, but empty buttons as placeholders
52 | including all normal UI functionality within the panel...
53 | ... but not actually doing anything with data.
54 | Created Colour-scheme for panels (staying in the orange and blue realm)
55 | Trapped when the pointer is over the UI Panel
56 | Hackish, but better than nothing
57 |
58 | 1.11
59 | Moved "TogglePanel()" from "HUDController" to a new "UIController"
60 | Created "UIController" instance on main Canvas for "TogglePanel()"
61 | Obtained & Implemented "SetInputFieldValue" script
62 | Obtained & Implemented "SetSliderValue" script
63 | Returned Allegiance Menu to 1:1 scale, and adjusted child objects
64 | Changed main Canvas to Pixel Perfect
65 | Attempting to move child panels to separate canvases, but failing
66 | Note: SetInputValue reverts to typed value when returning to input field (noted in UI Chat)
67 | Note: InputField errors if there is no value in the text field (http://pastebin.com/M2sm7Mje)
68 | Removed "UIController"
69 | Implemented and Refactored "TogglePanel()" as an anonymous function as "Toggle()" on the "TogglePanel" script
70 | Tweaked Slider Image Values (need to report this...) to make them clean
71 | "Highlight" on text overflowing the Background (need to report this...) still
72 | Imported JSON for .NET Library (need to BUY this for TAR)
73 | Tried and Removed using a Canvas on the drop down panels.
74 | (This will be broken until 4.6.1, at least...)
75 | Created DataController to connect to the EDSC:
76 | http://edstarcoordinator.com/api.asmx/GetSystems
77 | Successfully connecting and updating the Star Systems live
78 | Successfully saving the Star Systems as persistent data
79 | Successfully reading the Star Systems from persistent data on StartUp
80 | Moved the raw system data over to "MapController" as this is who needs it
81 | Adaped "MapController" to use the Raw Map Data from EDSC
82 | Laid groundwork on clean refresh of Star Database... this still causes issues and needs attention
83 | Update to 4.6f2
84 |
85 |
86 |
87 | TODO:
88 | All of these labels are active...
89 | ... so these could be used to pick the stars, avoiding colliders!
90 | Include an options menu to save all of these items:
91 | Type Size, Type Color, Zoom Cap, Jump Range Cap
92 | Create "Add New Star" to the UI
93 | Create "Push star data" to the back end
94 | Create local representation of the star data so it can be changed
95 | Consider hiding parts of the query to EDSC, like "DateAndTime", the coordinate filters...
96 | Need popup warning dialogue in "DataController"
97 | public RawData rawData; in "DataController" needs to be set to private when done testing
--------------------------------------------------------------------------------
/Assets/ChangeLog/ChangeLog.txt.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: d069a66aeb6d044598cc24ca1b9486df
3 | TextScriptImporter:
4 | userData:
5 |
--------------------------------------------------------------------------------
/Assets/Images.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 1a863eaad84bd412ca99a71810fff09c
3 | folderAsset: yes
4 | DefaultImporter:
5 | userData:
6 |
--------------------------------------------------------------------------------
/Assets/Images/CubeMap.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: cb570728f05a348ebaf148ec05df87e7
3 | folderAsset: yes
4 | DefaultImporter:
5 | userData:
6 |
--------------------------------------------------------------------------------
/Assets/Images/CubeMap/Milkyway01.tif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SimonDarksideJ/UnityUI-StarMap/deee6e03b30ca0cc265b3556af48e904be2c2daf/Assets/Images/CubeMap/Milkyway01.tif
--------------------------------------------------------------------------------
/Assets/Images/CubeMap/Milkyway01.tif.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: e735f09a03f6e4f9a85263c087812a47
3 | TextureImporter:
4 | fileIDToRecycleName: {}
5 | serializedVersion: 2
6 | mipmaps:
7 | mipMapMode: 0
8 | enableMipMap: 1
9 | linearTexture: 0
10 | correctGamma: 0
11 | fadeOut: 0
12 | borderMipMap: 0
13 | mipMapFadeDistanceStart: 1
14 | mipMapFadeDistanceEnd: 3
15 | bumpmap:
16 | convertToNormalMap: 0
17 | externalNormalMap: 0
18 | heightScale: .25
19 | normalMapFilter: 0
20 | isReadable: 0
21 | grayScaleToAlpha: 0
22 | generateCubemap: 0
23 | seamlessCubemap: 0
24 | textureFormat: -1
25 | maxTextureSize: 1024
26 | textureSettings:
27 | filterMode: -1
28 | aniso: -1
29 | mipBias: -1
30 | wrapMode: -1
31 | nPOTScale: 1
32 | lightmap: 0
33 | compressionQuality: 50
34 | spriteMode: 0
35 | spriteExtrude: 1
36 | spriteMeshType: 1
37 | alignment: 0
38 | spritePivot: {x: .5, y: .5}
39 | spriteBorder: {x: 0, y: 0, z: 0, w: 0}
40 | spritePixelsToUnits: 100
41 | alphaIsTransparency: 0
42 | textureType: -1
43 | buildTargetSettings: []
44 | spriteSheet:
45 | sprites: []
46 | spritePackingTag:
47 | userData:
48 |
--------------------------------------------------------------------------------
/Assets/Images/CubeMap/Milkyway02.tif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SimonDarksideJ/UnityUI-StarMap/deee6e03b30ca0cc265b3556af48e904be2c2daf/Assets/Images/CubeMap/Milkyway02.tif
--------------------------------------------------------------------------------
/Assets/Images/CubeMap/Milkyway02.tif.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: d056ef98072284732bb8838b92f0e43e
3 | TextureImporter:
4 | fileIDToRecycleName: {}
5 | serializedVersion: 2
6 | mipmaps:
7 | mipMapMode: 0
8 | enableMipMap: 1
9 | linearTexture: 0
10 | correctGamma: 0
11 | fadeOut: 0
12 | borderMipMap: 0
13 | mipMapFadeDistanceStart: 1
14 | mipMapFadeDistanceEnd: 3
15 | bumpmap:
16 | convertToNormalMap: 0
17 | externalNormalMap: 0
18 | heightScale: .25
19 | normalMapFilter: 0
20 | isReadable: 0
21 | grayScaleToAlpha: 0
22 | generateCubemap: 0
23 | seamlessCubemap: 0
24 | textureFormat: -1
25 | maxTextureSize: 1024
26 | textureSettings:
27 | filterMode: -1
28 | aniso: -1
29 | mipBias: -1
30 | wrapMode: -1
31 | nPOTScale: 1
32 | lightmap: 0
33 | compressionQuality: 50
34 | spriteMode: 0
35 | spriteExtrude: 1
36 | spriteMeshType: 1
37 | alignment: 0
38 | spritePivot: {x: .5, y: .5}
39 | spriteBorder: {x: 0, y: 0, z: 0, w: 0}
40 | spritePixelsToUnits: 100
41 | alphaIsTransparency: 0
42 | textureType: -1
43 | buildTargetSettings: []
44 | spriteSheet:
45 | sprites: []
46 | spritePackingTag:
47 | userData:
48 |
--------------------------------------------------------------------------------
/Assets/Images/CubeMap/Milkyway03.tif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SimonDarksideJ/UnityUI-StarMap/deee6e03b30ca0cc265b3556af48e904be2c2daf/Assets/Images/CubeMap/Milkyway03.tif
--------------------------------------------------------------------------------
/Assets/Images/CubeMap/Milkyway03.tif.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: ad3452e5b0aa04afab79d6c9461e87ec
3 | TextureImporter:
4 | fileIDToRecycleName: {}
5 | serializedVersion: 2
6 | mipmaps:
7 | mipMapMode: 0
8 | enableMipMap: 1
9 | linearTexture: 0
10 | correctGamma: 0
11 | fadeOut: 0
12 | borderMipMap: 0
13 | mipMapFadeDistanceStart: 1
14 | mipMapFadeDistanceEnd: 3
15 | bumpmap:
16 | convertToNormalMap: 0
17 | externalNormalMap: 0
18 | heightScale: .25
19 | normalMapFilter: 0
20 | isReadable: 0
21 | grayScaleToAlpha: 0
22 | generateCubemap: 0
23 | seamlessCubemap: 0
24 | textureFormat: -1
25 | maxTextureSize: 1024
26 | textureSettings:
27 | filterMode: -1
28 | aniso: -1
29 | mipBias: -1
30 | wrapMode: -1
31 | nPOTScale: 1
32 | lightmap: 0
33 | compressionQuality: 50
34 | spriteMode: 0
35 | spriteExtrude: 1
36 | spriteMeshType: 1
37 | alignment: 0
38 | spritePivot: {x: .5, y: .5}
39 | spriteBorder: {x: 0, y: 0, z: 0, w: 0}
40 | spritePixelsToUnits: 100
41 | alphaIsTransparency: 0
42 | textureType: -1
43 | buildTargetSettings: []
44 | spriteSheet:
45 | sprites: []
46 | spritePackingTag:
47 | userData:
48 |
--------------------------------------------------------------------------------
/Assets/Images/CubeMap/Milkyway04.tif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SimonDarksideJ/UnityUI-StarMap/deee6e03b30ca0cc265b3556af48e904be2c2daf/Assets/Images/CubeMap/Milkyway04.tif
--------------------------------------------------------------------------------
/Assets/Images/CubeMap/Milkyway04.tif.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 1f7dd0465b5af4ef99d3784ddb9e5684
3 | TextureImporter:
4 | fileIDToRecycleName: {}
5 | serializedVersion: 2
6 | mipmaps:
7 | mipMapMode: 0
8 | enableMipMap: 1
9 | linearTexture: 0
10 | correctGamma: 0
11 | fadeOut: 0
12 | borderMipMap: 0
13 | mipMapFadeDistanceStart: 1
14 | mipMapFadeDistanceEnd: 3
15 | bumpmap:
16 | convertToNormalMap: 0
17 | externalNormalMap: 0
18 | heightScale: .25
19 | normalMapFilter: 0
20 | isReadable: 0
21 | grayScaleToAlpha: 0
22 | generateCubemap: 0
23 | seamlessCubemap: 0
24 | textureFormat: -1
25 | maxTextureSize: 1024
26 | textureSettings:
27 | filterMode: -1
28 | aniso: -1
29 | mipBias: -1
30 | wrapMode: -1
31 | nPOTScale: 1
32 | lightmap: 0
33 | compressionQuality: 50
34 | spriteMode: 0
35 | spriteExtrude: 1
36 | spriteMeshType: 1
37 | alignment: 0
38 | spritePivot: {x: .5, y: .5}
39 | spriteBorder: {x: 0, y: 0, z: 0, w: 0}
40 | spritePixelsToUnits: 100
41 | alphaIsTransparency: 0
42 | textureType: -1
43 | buildTargetSettings: []
44 | spriteSheet:
45 | sprites: []
46 | spritePackingTag:
47 | userData:
48 |
--------------------------------------------------------------------------------
/Assets/Images/CubeMap/Milkyway05.tif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SimonDarksideJ/UnityUI-StarMap/deee6e03b30ca0cc265b3556af48e904be2c2daf/Assets/Images/CubeMap/Milkyway05.tif
--------------------------------------------------------------------------------
/Assets/Images/CubeMap/Milkyway05.tif.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 47616d1cc4d8a40c0b774664f752e4af
3 | TextureImporter:
4 | fileIDToRecycleName: {}
5 | serializedVersion: 2
6 | mipmaps:
7 | mipMapMode: 0
8 | enableMipMap: 1
9 | linearTexture: 0
10 | correctGamma: 0
11 | fadeOut: 0
12 | borderMipMap: 0
13 | mipMapFadeDistanceStart: 1
14 | mipMapFadeDistanceEnd: 3
15 | bumpmap:
16 | convertToNormalMap: 0
17 | externalNormalMap: 0
18 | heightScale: .25
19 | normalMapFilter: 0
20 | isReadable: 0
21 | grayScaleToAlpha: 0
22 | generateCubemap: 0
23 | seamlessCubemap: 0
24 | textureFormat: -1
25 | maxTextureSize: 1024
26 | textureSettings:
27 | filterMode: -1
28 | aniso: -1
29 | mipBias: -1
30 | wrapMode: -1
31 | nPOTScale: 1
32 | lightmap: 0
33 | compressionQuality: 50
34 | spriteMode: 0
35 | spriteExtrude: 1
36 | spriteMeshType: 1
37 | alignment: 0
38 | spritePivot: {x: .5, y: .5}
39 | spriteBorder: {x: 0, y: 0, z: 0, w: 0}
40 | spritePixelsToUnits: 100
41 | alphaIsTransparency: 0
42 | textureType: -1
43 | buildTargetSettings: []
44 | spriteSheet:
45 | sprites: []
46 | spritePackingTag:
47 | userData:
48 |
--------------------------------------------------------------------------------
/Assets/Images/CubeMap/Milkyway06.tif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SimonDarksideJ/UnityUI-StarMap/deee6e03b30ca0cc265b3556af48e904be2c2daf/Assets/Images/CubeMap/Milkyway06.tif
--------------------------------------------------------------------------------
/Assets/Images/CubeMap/Milkyway06.tif.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 479d065c02e78486f98f20d03841bb71
3 | TextureImporter:
4 | fileIDToRecycleName: {}
5 | serializedVersion: 2
6 | mipmaps:
7 | mipMapMode: 0
8 | enableMipMap: 1
9 | linearTexture: 0
10 | correctGamma: 0
11 | fadeOut: 0
12 | borderMipMap: 0
13 | mipMapFadeDistanceStart: 1
14 | mipMapFadeDistanceEnd: 3
15 | bumpmap:
16 | convertToNormalMap: 0
17 | externalNormalMap: 0
18 | heightScale: .25
19 | normalMapFilter: 0
20 | isReadable: 0
21 | grayScaleToAlpha: 0
22 | generateCubemap: 0
23 | seamlessCubemap: 0
24 | textureFormat: -1
25 | maxTextureSize: 1024
26 | textureSettings:
27 | filterMode: -1
28 | aniso: -1
29 | mipBias: -1
30 | wrapMode: -1
31 | nPOTScale: 1
32 | lightmap: 0
33 | compressionQuality: 50
34 | spriteMode: 0
35 | spriteExtrude: 1
36 | spriteMeshType: 1
37 | alignment: 0
38 | spritePivot: {x: .5, y: .5}
39 | spriteBorder: {x: 0, y: 0, z: 0, w: 0}
40 | spritePixelsToUnits: 100
41 | alphaIsTransparency: 0
42 | textureType: -1
43 | buildTargetSettings: []
44 | spriteSheet:
45 | sprites: []
46 | spritePackingTag:
47 | userData:
48 |
--------------------------------------------------------------------------------
/Assets/Images/CubeMap/Thumbs.db:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SimonDarksideJ/UnityUI-StarMap/deee6e03b30ca0cc265b3556af48e904be2c2daf/Assets/Images/CubeMap/Thumbs.db
--------------------------------------------------------------------------------
/Assets/Images/CubeMap/Thumbs.db.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 01cfc4fa8c961de40bf4521797297b91
3 | timeCreated: 1452246729
4 | licenseType: Pro
5 | DefaultImporter:
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Images/HexGrid-Civ5-Hexagons-24x24_2.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SimonDarksideJ/UnityUI-StarMap/deee6e03b30ca0cc265b3556af48e904be2c2daf/Assets/Images/HexGrid-Civ5-Hexagons-24x24_2.gif
--------------------------------------------------------------------------------
/Assets/Images/HexGrid-Civ5-Hexagons-24x24_2.gif.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: b5d0bf2a2a62f4420bb4e8048ca5a137
3 | TextureImporter:
4 | fileIDToRecycleName: {}
5 | serializedVersion: 2
6 | mipmaps:
7 | mipMapMode: 0
8 | enableMipMap: 1
9 | linearTexture: 0
10 | correctGamma: 0
11 | fadeOut: 0
12 | borderMipMap: 0
13 | mipMapFadeDistanceStart: 1
14 | mipMapFadeDistanceEnd: 3
15 | bumpmap:
16 | convertToNormalMap: 0
17 | externalNormalMap: 0
18 | heightScale: .25
19 | normalMapFilter: 0
20 | isReadable: 0
21 | grayScaleToAlpha: 0
22 | generateCubemap: 0
23 | seamlessCubemap: 0
24 | textureFormat: -1
25 | maxTextureSize: 1024
26 | textureSettings:
27 | filterMode: -1
28 | aniso: -1
29 | mipBias: -1
30 | wrapMode: -1
31 | nPOTScale: 1
32 | lightmap: 0
33 | compressionQuality: 50
34 | spriteMode: 0
35 | spriteExtrude: 1
36 | spriteMeshType: 1
37 | alignment: 0
38 | spritePivot: {x: .5, y: .5}
39 | spriteBorder: {x: 0, y: 0, z: 0, w: 0}
40 | spritePixelsToUnits: 100
41 | alphaIsTransparency: 0
42 | textureType: -1
43 | buildTargetSettings: []
44 | spriteSheet:
45 | sprites: []
46 | spritePackingTag:
47 | userData:
48 |
--------------------------------------------------------------------------------
/Assets/Images/Icons.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 9e735f89412474b95b68aad446ef1265
3 | folderAsset: yes
4 | DefaultImporter:
5 | userData:
6 |
--------------------------------------------------------------------------------
/Assets/Images/Icons/Materials.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 6f8965d8ad81f461ab5e2b20b80f7ec0
3 | folderAsset: yes
4 | DefaultImporter:
5 | userData:
6 |
--------------------------------------------------------------------------------
/Assets/Images/Icons/Materials/TempStarIcon.mat:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SimonDarksideJ/UnityUI-StarMap/deee6e03b30ca0cc265b3556af48e904be2c2daf/Assets/Images/Icons/Materials/TempStarIcon.mat
--------------------------------------------------------------------------------
/Assets/Images/Icons/Materials/TempStarIcon.mat.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 925a2b2937b7e41a6b0f85229fe3482e
3 | NativeFormatImporter:
4 | userData:
5 |
--------------------------------------------------------------------------------
/Assets/Images/Icons/TempStarIcon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SimonDarksideJ/UnityUI-StarMap/deee6e03b30ca0cc265b3556af48e904be2c2daf/Assets/Images/Icons/TempStarIcon.png
--------------------------------------------------------------------------------
/Assets/Images/Icons/TempStarIcon.png.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: f38425804dc544e54af00e73440e5f2b
3 | TextureImporter:
4 | fileIDToRecycleName: {}
5 | serializedVersion: 2
6 | mipmaps:
7 | mipMapMode: 0
8 | enableMipMap: 1
9 | linearTexture: 0
10 | correctGamma: 0
11 | fadeOut: 0
12 | borderMipMap: 0
13 | mipMapFadeDistanceStart: 1
14 | mipMapFadeDistanceEnd: 3
15 | bumpmap:
16 | convertToNormalMap: 0
17 | externalNormalMap: 0
18 | heightScale: .25
19 | normalMapFilter: 0
20 | isReadable: 0
21 | grayScaleToAlpha: 0
22 | generateCubemap: 0
23 | seamlessCubemap: 0
24 | textureFormat: -1
25 | maxTextureSize: 1024
26 | textureSettings:
27 | filterMode: -1
28 | aniso: -1
29 | mipBias: -1
30 | wrapMode: -1
31 | nPOTScale: 1
32 | lightmap: 0
33 | compressionQuality: 50
34 | spriteMode: 0
35 | spriteExtrude: 1
36 | spriteMeshType: 1
37 | alignment: 0
38 | spritePivot: {x: .5, y: .5}
39 | spriteBorder: {x: 0, y: 0, z: 0, w: 0}
40 | spritePixelsToUnits: 100
41 | alphaIsTransparency: 0
42 | textureType: -1
43 | buildTargetSettings: []
44 | spriteSheet:
45 | sprites: []
46 | spritePackingTag:
47 | userData:
48 |
--------------------------------------------------------------------------------
/Assets/Images/UI Elements.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: e4405d451505d4b258b07f1855e6b327
3 | folderAsset: yes
4 | DefaultImporter:
5 | userData:
6 |
--------------------------------------------------------------------------------
/Assets/Images/UI Elements/Border.tif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SimonDarksideJ/UnityUI-StarMap/deee6e03b30ca0cc265b3556af48e904be2c2daf/Assets/Images/UI Elements/Border.tif
--------------------------------------------------------------------------------
/Assets/Images/UI Elements/Border.tif.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 1d56514611e1a4f93abf711b7073d3d2
3 | TextureImporter:
4 | fileIDToRecycleName:
5 | 21300000: Border_0
6 | serializedVersion: 2
7 | mipmaps:
8 | mipMapMode: 0
9 | enableMipMap: 1
10 | linearTexture: 0
11 | correctGamma: 0
12 | fadeOut: 0
13 | borderMipMap: 0
14 | mipMapFadeDistanceStart: 1
15 | mipMapFadeDistanceEnd: 3
16 | bumpmap:
17 | convertToNormalMap: 0
18 | externalNormalMap: 0
19 | heightScale: .25
20 | normalMapFilter: 0
21 | isReadable: 0
22 | grayScaleToAlpha: 0
23 | generateCubemap: 0
24 | seamlessCubemap: 0
25 | textureFormat: -1
26 | maxTextureSize: 1024
27 | textureSettings:
28 | filterMode: -1
29 | aniso: 16
30 | mipBias: -1
31 | wrapMode: 1
32 | nPOTScale: 0
33 | lightmap: 0
34 | compressionQuality: 50
35 | spriteMode: 2
36 | spriteExtrude: 1
37 | spriteMeshType: 1
38 | alignment: 0
39 | spritePivot: {x: .5, y: .5}
40 | spriteBorder: {x: 0, y: 0, z: 0, w: 0}
41 | spritePixelsToUnits: 100
42 | alphaIsTransparency: 1
43 | textureType: 8
44 | buildTargetSettings: []
45 | spriteSheet:
46 | sprites:
47 | - name: Border_0
48 | rect:
49 | serializedVersion: 2
50 | x: 0
51 | y: 0
52 | width: 8
53 | height: 8
54 | alignment: 0
55 | pivot: {x: .5, y: .5}
56 | border: {x: 2, y: 2, z: 2, w: 2}
57 | spritePackingTag:
58 | userData:
59 |
--------------------------------------------------------------------------------
/Assets/Images/UI Elements/SF Background.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SimonDarksideJ/UnityUI-StarMap/deee6e03b30ca0cc265b3556af48e904be2c2daf/Assets/Images/UI Elements/SF Background.jpg
--------------------------------------------------------------------------------
/Assets/Images/UI Elements/SF Background.jpg.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: ae13d475bfeb14e7dbaca0ac11847d65
3 | TextureImporter:
4 | fileIDToRecycleName: {}
5 | serializedVersion: 2
6 | mipmaps:
7 | mipMapMode: 0
8 | enableMipMap: 1
9 | linearTexture: 0
10 | correctGamma: 0
11 | fadeOut: 0
12 | borderMipMap: 0
13 | mipMapFadeDistanceStart: 1
14 | mipMapFadeDistanceEnd: 3
15 | bumpmap:
16 | convertToNormalMap: 0
17 | externalNormalMap: 0
18 | heightScale: .25
19 | normalMapFilter: 0
20 | isReadable: 0
21 | grayScaleToAlpha: 0
22 | generateCubemap: 0
23 | seamlessCubemap: 0
24 | textureFormat: -1
25 | maxTextureSize: 1024
26 | textureSettings:
27 | filterMode: -1
28 | aniso: 16
29 | mipBias: -1
30 | wrapMode: 1
31 | nPOTScale: 0
32 | lightmap: 0
33 | compressionQuality: 50
34 | spriteMode: 1
35 | spriteExtrude: 1
36 | spriteMeshType: 1
37 | alignment: 0
38 | spritePivot: {x: .5, y: .5}
39 | spriteBorder: {x: 0, y: 0, z: 0, w: 0}
40 | spritePixelsToUnits: 100
41 | alphaIsTransparency: 1
42 | textureType: 8
43 | buildTargetSettings: []
44 | spriteSheet:
45 | sprites: []
46 | spritePackingTag:
47 | userData:
48 |
--------------------------------------------------------------------------------
/Assets/Images/UI Elements/SF Button.psd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SimonDarksideJ/UnityUI-StarMap/deee6e03b30ca0cc265b3556af48e904be2c2daf/Assets/Images/UI Elements/SF Button.psd
--------------------------------------------------------------------------------
/Assets/Images/UI Elements/SF Button.psd.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: b9f37296455cc47b08594ef311a90240
3 | TextureImporter:
4 | fileIDToRecycleName:
5 | 21300000: SF Button_0
6 | serializedVersion: 2
7 | mipmaps:
8 | mipMapMode: 0
9 | enableMipMap: 1
10 | linearTexture: 0
11 | correctGamma: 0
12 | fadeOut: 0
13 | borderMipMap: 0
14 | mipMapFadeDistanceStart: 1
15 | mipMapFadeDistanceEnd: 3
16 | bumpmap:
17 | convertToNormalMap: 0
18 | externalNormalMap: 0
19 | heightScale: .25
20 | normalMapFilter: 0
21 | isReadable: 0
22 | grayScaleToAlpha: 0
23 | generateCubemap: 0
24 | seamlessCubemap: 0
25 | textureFormat: -1
26 | maxTextureSize: 1024
27 | textureSettings:
28 | filterMode: -1
29 | aniso: 16
30 | mipBias: -1
31 | wrapMode: 1
32 | nPOTScale: 0
33 | lightmap: 0
34 | compressionQuality: 50
35 | spriteMode: 2
36 | spriteExtrude: 1
37 | spriteMeshType: 1
38 | alignment: 0
39 | spritePivot: {x: .5, y: .5}
40 | spriteBorder: {x: 0, y: 0, z: 0, w: 0}
41 | spritePixelsToUnits: 100
42 | alphaIsTransparency: 1
43 | textureType: 8
44 | buildTargetSettings: []
45 | spriteSheet:
46 | sprites:
47 | - name: SF Button_0
48 | rect:
49 | serializedVersion: 2
50 | x: 2
51 | y: 4
52 | width: 226
53 | height: 62
54 | alignment: 0
55 | pivot: {x: .5, y: .5}
56 | border: {x: 8, y: 5, z: 8, w: 5}
57 | spritePackingTag:
58 | userData:
59 |
--------------------------------------------------------------------------------
/Assets/Images/UI Elements/SF Title.psd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SimonDarksideJ/UnityUI-StarMap/deee6e03b30ca0cc265b3556af48e904be2c2daf/Assets/Images/UI Elements/SF Title.psd
--------------------------------------------------------------------------------
/Assets/Images/UI Elements/SF Title.psd.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: da9ebe6139ed64b57b8e0d22737316d2
3 | TextureImporter:
4 | fileIDToRecycleName: {}
5 | serializedVersion: 2
6 | mipmaps:
7 | mipMapMode: 0
8 | enableMipMap: 1
9 | linearTexture: 0
10 | correctGamma: 0
11 | fadeOut: 0
12 | borderMipMap: 0
13 | mipMapFadeDistanceStart: 1
14 | mipMapFadeDistanceEnd: 3
15 | bumpmap:
16 | convertToNormalMap: 0
17 | externalNormalMap: 0
18 | heightScale: .25
19 | normalMapFilter: 0
20 | isReadable: 0
21 | grayScaleToAlpha: 0
22 | generateCubemap: 0
23 | seamlessCubemap: 0
24 | textureFormat: -1
25 | maxTextureSize: 1024
26 | textureSettings:
27 | filterMode: -1
28 | aniso: 16
29 | mipBias: -1
30 | wrapMode: 1
31 | nPOTScale: 0
32 | lightmap: 0
33 | compressionQuality: 50
34 | spriteMode: 1
35 | spriteExtrude: 1
36 | spriteMeshType: 1
37 | alignment: 0
38 | spritePivot: {x: .5, y: .5}
39 | spriteBorder: {x: 0, y: 0, z: 0, w: 0}
40 | spritePixelsToUnits: 100
41 | alphaIsTransparency: 1
42 | textureType: 8
43 | buildTargetSettings: []
44 | spriteSheet:
45 | sprites: []
46 | spritePackingTag:
47 | userData:
48 |
--------------------------------------------------------------------------------
/Assets/Images/UI Elements/SF Window.psd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SimonDarksideJ/UnityUI-StarMap/deee6e03b30ca0cc265b3556af48e904be2c2daf/Assets/Images/UI Elements/SF Window.psd
--------------------------------------------------------------------------------
/Assets/Images/UI Elements/SF Window.psd.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 4ce755885fa7344a1b318901b5ef680b
3 | TextureImporter:
4 | fileIDToRecycleName:
5 | 21300000: SF Window_0
6 | serializedVersion: 2
7 | mipmaps:
8 | mipMapMode: 0
9 | enableMipMap: 1
10 | linearTexture: 0
11 | correctGamma: 0
12 | fadeOut: 0
13 | borderMipMap: 0
14 | mipMapFadeDistanceStart: 1
15 | mipMapFadeDistanceEnd: 3
16 | bumpmap:
17 | convertToNormalMap: 0
18 | externalNormalMap: 0
19 | heightScale: .25
20 | normalMapFilter: 0
21 | isReadable: 0
22 | grayScaleToAlpha: 0
23 | generateCubemap: 0
24 | seamlessCubemap: 0
25 | textureFormat: -1
26 | maxTextureSize: 1024
27 | textureSettings:
28 | filterMode: -1
29 | aniso: 16
30 | mipBias: -1
31 | wrapMode: 1
32 | nPOTScale: 0
33 | lightmap: 0
34 | compressionQuality: 50
35 | spriteMode: 2
36 | spriteExtrude: 1
37 | spriteMeshType: 1
38 | alignment: 0
39 | spritePivot: {x: .5, y: .5}
40 | spriteBorder: {x: 0, y: 0, z: 0, w: 0}
41 | spritePixelsToUnits: 100
42 | alphaIsTransparency: 1
43 | textureType: 8
44 | buildTargetSettings: []
45 | spriteSheet:
46 | sprites:
47 | - name: SF Window_0
48 | rect:
49 | serializedVersion: 2
50 | x: 29
51 | y: 20
52 | width: 425
53 | height: 185
54 | alignment: 0
55 | pivot: {x: .5, y: .5}
56 | border: {x: 11, y: 17, z: 10, w: 17}
57 | spritePackingTag:
58 | userData:
59 |
--------------------------------------------------------------------------------
/Assets/Materials.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 194f9510663a54cceb46639468cb5533
3 | folderAsset: yes
4 | DefaultImporter:
5 | userData:
6 |
--------------------------------------------------------------------------------
/Assets/Materials/Line.mat:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SimonDarksideJ/UnityUI-StarMap/deee6e03b30ca0cc265b3556af48e904be2c2daf/Assets/Materials/Line.mat
--------------------------------------------------------------------------------
/Assets/Materials/Line.mat.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 3973d1a8549794ad1bfb0854353b1224
3 | NativeFormatImporter:
4 | userData:
5 |
--------------------------------------------------------------------------------
/Assets/Materials/Milkyway.mat:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SimonDarksideJ/UnityUI-StarMap/deee6e03b30ca0cc265b3556af48e904be2c2daf/Assets/Materials/Milkyway.mat
--------------------------------------------------------------------------------
/Assets/Materials/Milkyway.mat.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: f920fe77e02ff4e33b77bc36be72fb77
3 | NativeFormatImporter:
4 | userData:
5 |
--------------------------------------------------------------------------------
/Assets/Materials/Plane.mat:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SimonDarksideJ/UnityUI-StarMap/deee6e03b30ca0cc265b3556af48e904be2c2daf/Assets/Materials/Plane.mat
--------------------------------------------------------------------------------
/Assets/Materials/Plane.mat.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: dc767aa02f4bb492e91ad6cafd40bce8
3 | NativeFormatImporter:
4 | userData:
5 |
--------------------------------------------------------------------------------
/Assets/Materials/Star.mat:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SimonDarksideJ/UnityUI-StarMap/deee6e03b30ca0cc265b3556af48e904be2c2daf/Assets/Materials/Star.mat
--------------------------------------------------------------------------------
/Assets/Materials/Star.mat.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: f377a469347ca4c69bcdaf3e1da57707
3 | NativeFormatImporter:
4 | userData:
5 |
--------------------------------------------------------------------------------
/Assets/Prefabs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 3e11db075f9144c6da19030509f2d942
3 | folderAsset: yes
4 | DefaultImporter:
5 | userData:
6 |
--------------------------------------------------------------------------------
/Assets/Prefabs/Star Label.prefab:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SimonDarksideJ/UnityUI-StarMap/deee6e03b30ca0cc265b3556af48e904be2c2daf/Assets/Prefabs/Star Label.prefab
--------------------------------------------------------------------------------
/Assets/Prefabs/Star Label.prefab.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: a3e1f125a383e4e31997fde7498be53f
3 | NativeFormatImporter:
4 | userData:
5 |
--------------------------------------------------------------------------------
/Assets/Prefabs/Star.prefab:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SimonDarksideJ/UnityUI-StarMap/deee6e03b30ca0cc265b3556af48e904be2c2daf/Assets/Prefabs/Star.prefab
--------------------------------------------------------------------------------
/Assets/Prefabs/Star.prefab.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 48876bcf6dc854fdda73e64398737f8e
3 | NativeFormatImporter:
4 | userData:
5 |
--------------------------------------------------------------------------------
/Assets/Raw Star Data.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 59dd75c36a24e483f846f0d776d94d49
3 | folderAsset: yes
4 | DefaultImporter:
5 | userData:
6 |
--------------------------------------------------------------------------------
/Assets/Scripts.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 2564119595f504458a10bfe89a880e55
3 | folderAsset: yes
4 | DefaultImporter:
5 | userData:
6 |
--------------------------------------------------------------------------------
/Assets/Scripts/CameraLookAt.cs:
--------------------------------------------------------------------------------
1 | using UnityEngine;
2 | using UnityEngine.UI;
3 | using UnityEngine.EventSystems;
4 | using System.Collections;
5 |
6 | public class CameraLookAt : MonoBehaviour {
7 |
8 | public float distance;
9 | public Vector2 clampDistance;
10 |
11 | public float pivotSpeed;
12 | public float panSpeed;
13 | public float dollySpeed;
14 | public float smoothTime;
15 |
16 | private float x;
17 | private float y;
18 | private float xSmooth;
19 | private float ySmooth;
20 | private float xVelocity;
21 | private float yVelocity;
22 | private Vector3 posSmooth;
23 | private Vector3 posVelocity;
24 | private Transform mainCameraTransform;
25 |
26 | private Transform target;
27 | private Vector3 savedTargetCoordinates;
28 |
29 | private bool isOverUI;
30 |
31 | #region Reference Support
32 | private static CameraLookAt cameraLookAt;
33 |
34 | public static CameraLookAt Instance () {
35 | if (!cameraLookAt) {
36 | cameraLookAt = FindObjectOfType(typeof (CameraLookAt)) as CameraLookAt;
37 | if (!cameraLookAt) {
38 | Debug.LogError ("There needs to be one active CameraLookAt script on a GameObject in your scene.");
39 | }
40 | }
41 |
42 | return cameraLookAt;
43 | }
44 | #endregion
45 |
46 | void Awake () {
47 | posSmooth = transform.position;
48 | posVelocity = Vector3.zero;
49 | Vector3 angles = transform.eulerAngles;
50 | x = xSmooth = angles.y;
51 | y = ySmooth = angles.x;
52 | Camera mainCamera = Camera.main;
53 | mainCameraTransform = mainCamera.transform;
54 | GameObject targetObject = new GameObject ("Camera Target");
55 | target = targetObject.transform;
56 | PlayerPrefs.DeleteAll();
57 | savedTargetCoordinates = GetSavedCoordinates ();
58 | SetTarget (savedTargetCoordinates);
59 | isOverUI = false;
60 | }
61 |
62 | void LateUpdate () {
63 |
64 | distance -= Input.GetAxisRaw ("Mouse ScrollWheel");
65 | distance = Mathf.Clamp (distance, clampDistance.x, clampDistance.y);
66 |
67 | if (!isOverUI && Input.GetMouseButton (0) && !Input.GetMouseButton (1)) {
68 | x += Input.GetAxis ("Mouse X") * pivotSpeed;
69 | y -= Input.GetAxis ("Mouse Y") * pivotSpeed;
70 | }
71 |
72 | if (!isOverUI && !Input.GetMouseButton (0) && Input.GetMouseButton (1)) {
73 | Vector3 up = mainCameraTransform.TransformDirection(Vector3.up);
74 | Vector3 right = mainCameraTransform.TransformDirection(Vector3.left);
75 | float mouseX = Input.GetAxis ("Mouse X") * dollySpeed;
76 | float mouseY = Input.GetAxis ("Mouse Y") * dollySpeed;
77 | target.position += ((right * mouseX) + (up * -mouseY));
78 | }
79 | xSmooth = Mathf.SmoothDamp (xSmooth, x, ref xVelocity, smoothTime);
80 | ySmooth = Mathf.SmoothDamp (ySmooth, y, ref yVelocity, smoothTime);
81 |
82 | Quaternion rotation = Quaternion.Euler (ySmooth, xSmooth, 0.0f);
83 |
84 | posSmooth = Vector3.SmoothDamp(posSmooth, target.position,ref posVelocity, smoothTime);
85 |
86 | transform.rotation = rotation;
87 | transform.position = rotation * new Vector3(0.0f, 0.0f, -distance) + posSmooth;
88 | }
89 |
90 | public void SetTarget (Vector3 targetCoordinates) {
91 | target.position = targetCoordinates;
92 | SetSavedCoordinates (targetCoordinates);
93 | }
94 |
95 | Vector3 GetSavedCoordinates () {
96 | return new Vector3 (PlayerPrefs.GetFloat ("xCoord", -19.75f), PlayerPrefs.GetFloat ("yCoord", 41.78125f), PlayerPrefs.GetFloat ("zCoord", -3.1875f));
97 | // return new Vector3 (PlayerPrefs.GetFloat ("xCoord", 9965.25f), PlayerPrefs.GetFloat ("yCoord", 1026.78f), PlayerPrefs.GetFloat ("zCoord", 4101.81f));
98 | }
99 |
100 | void SetSavedCoordinates (Vector3 coordinates) {
101 | PlayerPrefs.SetFloat ("xCoord", coordinates.x);
102 | PlayerPrefs.SetFloat ("yCoord", coordinates.y);
103 | PlayerPrefs.SetFloat ("zCoord", coordinates.z);
104 | }
105 |
106 | public void SetOverUI (bool toggle) {
107 | isOverUI = toggle;
108 | }
109 | }
110 |
--------------------------------------------------------------------------------
/Assets/Scripts/CameraLookAt.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: fa2b60b2699d6441499a65ddd787cbea
3 | MonoImporter:
4 | serializedVersion: 2
5 | defaultReferences: []
6 | executionOrder: 0
7 | icon: {instanceID: 0}
8 | userData:
9 |
--------------------------------------------------------------------------------
/Assets/Scripts/DataController.cs:
--------------------------------------------------------------------------------
1 | using UnityEngine;
2 | using System.Text;
3 | using System.Collections;
4 | using System.Collections.Generic;
5 | using UnityEngine.Networking;
6 |
7 | #region class definitions
8 | [System.Serializable]
9 | public class StarQuery {
10 | public string systemName = string.Empty;
11 | public int showId = 0;
12 | public int showCoordinates = 1;
13 | public int showPermit = 0;
14 | public int showInformation = 0;
15 | public int showPrimaryStar = 0;
16 | ///
17 | /// Format as YYYY-MM-DD HH:MM:SS
18 | ///
19 | public string startDateTime = string.Empty;
20 | ///
21 | /// Format as YYYY-MM-DD HH:MM:SS
22 | ///
23 | public string endDateTime = string.Empty;
24 | public int onlyFeatured = 0;
25 | public int onlyKnownCoordinates = 1;
26 | public int onlyUnknownCoordinates = 0;
27 | public int includeHidden = 0;
28 | }
29 |
30 | [System.Serializable]
31 | public class RawData {
32 | public SystemData[] systems;
33 | }
34 |
35 | [System.Serializable]
36 | public class SystemData {
37 | public string name;
38 | public int id;
39 | public string duplicates;
40 | public Coordinates coords;
41 | public string requirePermit;
42 | public string permitName;
43 | public string information;
44 | public string primaryStar;
45 | public string hidden_at;
46 | public string mergedTo;
47 | public bool coordsLocked;
48 | }
49 |
50 | [System.Serializable]
51 | public class Coordinates {
52 | public double x;
53 | public double y;
54 | public double z;
55 | }
56 |
57 | [System.Serializable]
58 | public class URLs {
59 | public string getSystems;
60 | public string getDistances;
61 | public string setDistances;
62 | }
63 | #endregion
64 |
65 | public class DataController : MonoBehaviour
66 | {
67 | private URLs urls;
68 | public StarQuery query;
69 | private string serializedQuery;
70 | private RawData rawData;
71 | private MapController mapController;
72 |
73 | void Awake()
74 | {
75 | urls = new URLs();
76 | urls.getSystems = "https://www.edsm.net/api-v1/systems";
77 | urls.getDistances = "http://edstarcoordinator.com/api.asmx/GetDistances";
78 | urls.setDistances = "http://edstarcoordinator.com/api.asmx/SetDistances";
79 | rawData = new RawData();
80 | }
81 |
82 | void Start()
83 | {
84 | mapController = GetComponent();
85 | }
86 |
87 | public RawData GetStarData()
88 | {
89 | if (System.IO.File.Exists(Application.persistentDataPath + "/StarData.json"))
90 | {
91 | string data = System.IO.File.ReadAllText(Application.persistentDataPath + "/StarData.json");
92 | ProcessStarData(data);
93 | return rawData;
94 | }
95 | else
96 | {
97 | Debug.LogWarning("StarData.json is Missing! GetStarData returns no data! Update StarData and try again!");
98 | return null;
99 | }
100 | }
101 |
102 | public void RefreshStarData()
103 | {
104 | Debug.Log("Updating!");
105 | StartCoroutine(UpdateStarData(query));
106 | }
107 |
108 | IEnumerator UpdateStarData(StarQuery query)
109 | {
110 | //query.systemName = "Thailoae FN-L b40-1";
111 | //query.showCoordinates = 1;
112 |
113 | UnityWebRequest unityWebRequest = UnityWebRequest.Get(urls.getSystems + GetRequestQuery(query));
114 |
115 | unityWebRequest.SetRequestHeader("Content-Type", "application/json; charset=utf-8");
116 |
117 | yield return unityWebRequest.SendWebRequest();
118 |
119 | if (unityWebRequest.error != null)
120 | {
121 | Debug.LogWarning("Error updating star data! " + unityWebRequest.error);
122 | // Popup warning dialogue
123 | }
124 | else
125 | {
126 | ProcessStarData(unityWebRequest.downloadHandler.text);
127 | mapController.CreateMap();
128 | }
129 | }
130 |
131 | void ProcessStarData(string data)
132 | {
133 | rawData = JsonUtility.FromJson("{\"systems\":" + data + "}");
134 | System.IO.File.WriteAllText(Application.persistentDataPath + "/StarData.json", data);
135 | }
136 |
137 | string GetRequestQuery(StarQuery query)
138 | {
139 | string queryString = "?";
140 |
141 | if (query.systemName != string.Empty) queryString = queryString + "systemName=" + query.systemName + "&";
142 | if (query.showId == 1) queryString = queryString + "showId=" + query.showId + "&";
143 | if (query.showCoordinates == 1) queryString = queryString + "showCoordinates=" + query.showCoordinates + "&";
144 | if (query.showPermit == 1) queryString = queryString + "showPermit=" + query.showPermit + "&";
145 | if (query.showInformation == 1) queryString = queryString + "showInformation=" + query.showInformation + "&";
146 | if (query.showPrimaryStar == 1) queryString = queryString + "sysshowPrimaryStartemName=" + query.showPrimaryStar + "&";
147 | if (query.startDateTime != string.Empty) queryString = queryString + "startDateTime=" + query.startDateTime + "&";
148 | if (query.endDateTime != string.Empty) queryString = queryString + "endDateTime=" + query.endDateTime + "&";
149 | if (query.onlyFeatured == 1) queryString = queryString + "onlyFeatured=" + query.onlyFeatured + "&";
150 | if (query.onlyKnownCoordinates == 1) queryString = queryString + "onlyKnownCoordinates=" + query.onlyKnownCoordinates + "&";
151 | if (query.onlyUnknownCoordinates == 1) queryString = queryString + "onlyUnknownCoordinates=" + query.onlyUnknownCoordinates + "&";
152 | if (query.includeHidden == 1) queryString = queryString + "includeHidden=" + query.includeHidden + "&";
153 |
154 | return queryString.Substring(0,queryString.Length - 1);
155 | }
156 | }
--------------------------------------------------------------------------------
/Assets/Scripts/DataController.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: dfea84c837f1a4464939da35e8370509
3 | MonoImporter:
4 | serializedVersion: 2
5 | defaultReferences: []
6 | executionOrder: 0
7 | icon: {instanceID: 0}
8 | userData:
9 |
--------------------------------------------------------------------------------
/Assets/Scripts/GlobalDefinitions.cs:
--------------------------------------------------------------------------------
1 | using UnityEngine;
2 | using System.Collections;
3 |
4 | public enum StarType {Red, Yellow, Blue};
5 | public enum Allegiance {None, Independent, Federation};
6 | public enum Economy {None, Agriculture, Extraction, Refinery, HighTech, Industrial};
7 | public enum Government {};
8 | public enum StationType {};
9 |
10 | [System.Serializable]
11 | public class StarSystemDetails {
12 | public StarType starType;
13 | public Allegiance allegiance;
14 | public Economy economy;
15 | public Government government;
16 | public int population;
17 | public bool blackMarket;
18 | public StationDetails[] Stations;
19 | }
20 |
21 | [System.Serializable]
22 | public class StationDetails {
23 | public string stationName;
24 | public StationType stationType;
25 | public float distanceFromBeacon;
26 | }
27 |
28 | //[System.Serializable]
29 | //public class StarLabel {
30 | // public Text labelText;
31 | // public bool isInView;
32 | // public Vector3 starCoordinates;
33 | //}
--------------------------------------------------------------------------------
/Assets/Scripts/GlobalDefinitions.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 116f66a114fe449ae917adce270b457d
3 | MonoImporter:
4 | serializedVersion: 2
5 | defaultReferences: []
6 | executionOrder: 0
7 | icon: {instanceID: 0}
8 | userData:
9 |
--------------------------------------------------------------------------------
/Assets/Scripts/HUDController.cs:
--------------------------------------------------------------------------------
1 | using UnityEngine;
2 | using UnityEngine.UI;
3 | using System.Collections;
4 | using System.Collections.Generic;
5 |
6 | public class HUDController : MonoBehaviour {
7 |
8 | public Text starName;
9 | public Text starType;
10 | public Text allegiance;
11 | public Text economy;
12 | public Text government;
13 | public Text blackMarket;
14 | public Text station;
15 |
16 | public float defaultJumpDistance;
17 | public Text jumpDistanceLabel;
18 | public Slider jumpDistanceSlider;
19 |
20 | private Star currentStar;
21 | private float jumpDistance;
22 | private List starsInRange;
23 |
24 | #region Reference Support
25 | private static HUDController display;
26 |
27 | public static HUDController Instance () {
28 | if (!display) {
29 | display = FindObjectOfType(typeof (HUDController)) as HUDController;
30 | if (!display) {
31 | Debug.LogError ("There needs to be one active HUDController script on a GameObject in your scene.");
32 | }
33 | }
34 |
35 | return display;
36 | }
37 | #endregion
38 |
39 | void Awake () {
40 | jumpDistance = defaultJumpDistance;
41 | jumpDistanceSlider.value = jumpDistance;
42 | SetJumpDistance (jumpDistance);
43 | starsInRange = new List ();
44 | }
45 |
46 | public void SetStar (Star newStar) {
47 | currentStar = newStar;
48 | SetStarData ();
49 | ClearJumpLines ();
50 | GatherStars (currentStar.coordinates, jumpDistance, starsInRange);
51 | CalculateJumpLines ();
52 | }
53 |
54 | void SetStarData () {
55 | starName.text = currentStar.starName;
56 | // starType.text = "Star Type";
57 | // allegiance.text = "Allegiance";
58 | // economy.text = "Economy";
59 | // government.text = "Government";
60 | // blackMarket.text = "Black Market";
61 |
62 | // starType.text = currentStar.starSystemDetails.starType;
63 | // allegiance.text = currentStar.starSystemDetails.allegiance;
64 | // economy.text = currentStar.starSystemDetails.economy;
65 | // government.text = currentStar.starSystemDetails.government;
66 | // blackMarket.text = currentStar.starSystemDetails.blackMarket;
67 |
68 | station.text = SetStations ();
69 | }
70 |
71 | string SetStations () {
72 | return "Station 01";
73 | }
74 |
75 | public void ClearJumpLines () {
76 | foreach (Star star in starsInRange) {
77 | star.line.SetPosition (1, star.coordinates);
78 | star.line.SetPosition (0, star.coordinates);
79 | }
80 | }
81 |
82 | void GatherStars (Vector3 centerPoint, float distance, List starsInRange) {
83 | Collider[] hitColliders = Physics.OverlapSphere (centerPoint, distance);
84 | starsInRange.Clear();
85 | foreach (Collider hitCollider in hitColliders) {
86 | Star star = hitCollider.GetComponent ();
87 | starsInRange.Add (star);
88 | }
89 | }
90 |
91 | public void CalculateJumpLines () {
92 | foreach (Star star in starsInRange) {
93 | if (Vector3.Distance (star.coordinates, currentStar.coordinates) < jumpDistance) {
94 | star.line.SetPosition (0, star.coordinates);
95 | star.line.SetPosition (1, currentStar.coordinates);
96 | }
97 | }
98 | }
99 |
100 | public void SetJumpDistance (float newValue) {
101 | jumpDistance = newValue;
102 | if (currentStar) {
103 | ClearJumpLines ();
104 | GatherStars (currentStar.coordinates, jumpDistance, starsInRange);
105 | CalculateJumpLines ();
106 | }
107 | }
108 | }
--------------------------------------------------------------------------------
/Assets/Scripts/HUDController.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 6340b668696d74e3b85597a1d433c6c5
3 | MonoImporter:
4 | serializedVersion: 2
5 | defaultReferences: []
6 | executionOrder: 0
7 | icon: {instanceID: 0}
8 | userData:
9 |
--------------------------------------------------------------------------------
/Assets/Scripts/LabelPool.cs:
--------------------------------------------------------------------------------
1 | using UnityEngine;
2 | using UnityEngine.UI;
3 | using System.Collections;
4 | using System.Collections.Generic;
5 |
6 | public class LabelPool : MonoBehaviour {
7 | public GameObject objectPrefab;
8 | public Canvas canvas;
9 | public string poolParentName;
10 |
11 | private Transform canvasTransform;
12 | private List pool;
13 | private Transform poolParent;
14 |
15 | #region Reference Support
16 | private static LabelPool labelPool;
17 |
18 | public static LabelPool Instance () {
19 | if (!labelPool) {
20 | labelPool = FindObjectOfType(typeof (LabelPool)) as LabelPool;
21 | if (!labelPool) {
22 | Debug.LogError ("There needs to be one active LabelPool script on a GameObject in your scene.");
23 | }
24 | }
25 |
26 | return labelPool;
27 | }
28 | #endregion
29 |
30 | void Awake () {
31 | pool = new List();
32 | }
33 |
34 | void Start () {
35 | GameObject parentObject = new GameObject (poolParentName);
36 | poolParent = parentObject.transform;
37 | canvasTransform = canvas.GetComponent ();
38 | poolParent.transform.SetParent (canvasTransform);
39 | poolParent.SetAsFirstSibling ();
40 | }
41 |
42 | public Text GetLabel() {
43 | foreach (Text label in pool) {
44 | if (label.gameObject.activeSelf == false) {
45 | return label;
46 | }
47 | }
48 |
49 | GameObject newLabelObject = Instantiate (objectPrefab, poolParent.position, Quaternion.identity) as GameObject;
50 | Text newLabel = newLabelObject.GetComponent ();
51 | pool.Add (newLabel);
52 | newLabel.transform.SetParent (poolParent);
53 |
54 | return newLabel;
55 | }
56 | }
--------------------------------------------------------------------------------
/Assets/Scripts/LabelPool.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 633e1d9772f194175bbb344edfb18578
3 | MonoImporter:
4 | serializedVersion: 2
5 | defaultReferences: []
6 | executionOrder: 0
7 | icon: {instanceID: 0}
8 | userData:
9 |
--------------------------------------------------------------------------------
/Assets/Scripts/MapController.cs:
--------------------------------------------------------------------------------
1 | using UnityEngine;
2 | using UnityEngine.UI;
3 | using System.Collections;
4 | using System.Collections.Generic;
5 | using static UnityEngine.ParticleSystem;
6 |
7 | public class MapController : MonoBehaviour {
8 |
9 | public TextAsset mapData;
10 | public GameObject starPrefab;
11 | public GameObject starLabel;
12 | public Vector2 clampViewDistance;
13 | public Vector3 labelOffset;
14 | public float starSize;
15 |
16 | private DataController dataController;
17 | public RawData rawData; // Make Private After Testing
18 |
19 | private List starSystems;
20 | private List viewableStars;
21 | private ParticleSystem starParticles;
22 | private Camera mainCamera;
23 | private Transform mainCameraTransform;
24 |
25 | private LabelPool labelPool;
26 |
27 | void Awake () {
28 | viewableStars = new List ();
29 | starParticles = GetComponent ();
30 | dataController = GetComponent ();
31 | }
32 |
33 | void Start () {
34 | mainCamera = Camera.main;
35 | mainCameraTransform = mainCamera.transform;
36 | labelPool = LabelPool.Instance ();
37 | CreateMap ();
38 | }
39 |
40 | public void CreateMap () {
41 | starSystems = new List ();
42 | GameObject starParent = new GameObject ("Star Parent");
43 | Transform starParentTransform = starParent.transform;
44 |
45 | rawData = dataController.GetStarData ();
46 | if (rawData == null) {
47 | Debug.LogWarning ("Raw Data is NULL from DataController.GetStarData. Please refresh star data and try again.");
48 | return;
49 | }
50 |
51 | List rawStarData = new List(rawData.systems);
52 | foreach (var starSystem in rawStarData) {
53 |
54 | GameObject starObject = Instantiate (starPrefab, Vector3.zero, Quaternion.identity) as GameObject;
55 | starObject.transform.parent = starParentTransform;
56 | starObject.name = starSystem.name;
57 |
58 | Star star = starObject.GetComponent ();
59 | star.starName = starSystem.name;
60 | if (starSystem.coords != null)
61 | {
62 | star.coordinates = new Vector3((float)starSystem.coords.x, (float)starSystem.coords.y, (float)starSystem.coords.z);
63 | }
64 | starObject.transform.position = star.coordinates;
65 | var emitParams = new EmitParams()
66 | {
67 | position = star.coordinates,
68 | velocity = Vector3.zero,
69 | startSize = starSize,
70 | startLifetime = Mathf.Infinity,
71 | startColor = Color.white
72 | };
73 | starParticles.Emit (emitParams,1);
74 | starSystems.Add (star);
75 | }
76 | }
77 |
78 | void Update () {
79 | // Push this to a coroutine
80 | foreach (Star star in starSystems) {
81 | bool viewCheck = CheckStarIsInView (star.coordinates);
82 | if (viewCheck != star.isInView) {
83 | if (viewCheck == true) {
84 | star.label = labelPool.GetLabel();
85 | star.label.gameObject.SetActive (true);
86 | star.labelRectTransform = star.label.transform as RectTransform;
87 | viewableStars.Add (star);
88 | star.isInView = true;
89 | star.label.text = star.starName;
90 | } else {
91 | star.label.gameObject.SetActive (false);
92 | viewableStars.Remove (star);
93 | star.labelRectTransform = null;
94 | star.label = null;
95 | star.isInView = false;
96 | }
97 | }
98 | }
99 |
100 | foreach (Star star in viewableStars) {
101 | star.label.transform.position = mainCamera.WorldToScreenPoint (star.coordinates) + labelOffset;;
102 | float labelAlpha = SetLabelAlpha (star.coordinates);
103 | Color labelColor = new Color (star.label.color.r, star.label.color.g, star.label.color.b, labelAlpha);
104 | star.label.color = labelColor;
105 | }
106 | }
107 |
108 | bool CheckStarIsInView (Vector3 coordinates) {
109 | Vector3 forward = mainCameraTransform.TransformDirection(Vector3.forward);
110 | Vector3 toOther = coordinates - mainCameraTransform.position;
111 | if (SetLabelAlpha (coordinates) > 0) {
112 | if (Vector3.Dot(forward, toOther) > 0) {
113 | Vector2 screenPosition = mainCamera.WorldToViewportPoint (coordinates);
114 | if (screenPosition.x > -0.1f && screenPosition.y > -0.1f && screenPosition.x < 1.1f && screenPosition.y < 1.1f) {
115 | return true;
116 | }
117 | }
118 | }
119 | return false;
120 | }
121 |
122 | float SetLabelAlpha (Vector3 coordinates) {
123 | float labelDistance = Vector3.Distance (mainCameraTransform.position, coordinates);
124 | float baseRange = clampViewDistance.y - clampViewDistance.x;
125 | float returnValueRaw = Mathf.Clamp ((labelDistance - baseRange)/baseRange, 0.0f, 1.0f);
126 | float returnValue = 1.0f - returnValueRaw;
127 | return returnValue;
128 | }
129 | }
130 |
--------------------------------------------------------------------------------
/Assets/Scripts/MapController.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 832e29f9c2c364788802cfcd8f514c99
3 | MonoImporter:
4 | serializedVersion: 2
5 | defaultReferences: []
6 | executionOrder: 0
7 | icon: {instanceID: 0}
8 | userData:
9 |
--------------------------------------------------------------------------------
/Assets/Scripts/SetTarget.cs:
--------------------------------------------------------------------------------
1 | using UnityEngine;
2 | using System.Collections;
3 |
4 | public class SetTarget : MonoBehaviour {
5 |
6 | private CameraLookAt cameraLookAt;
7 | private HUDController hudController;
8 | private Star star;
9 |
10 | void Awake () {
11 | star = GetComponent ();
12 | }
13 |
14 | void Start () {
15 | cameraLookAt = CameraLookAt.Instance ();
16 | hudController = HUDController.Instance ();
17 | }
18 |
19 | void OnMouseDown () {
20 | cameraLookAt.SetTarget (star.coordinates);
21 | hudController.SetStar (star);
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/Assets/Scripts/SetTarget.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: db49b4ada500d4bd1912786637ac692d
3 | MonoImporter:
4 | serializedVersion: 2
5 | defaultReferences: []
6 | executionOrder: 0
7 | icon: {instanceID: 0}
8 | userData:
9 |
--------------------------------------------------------------------------------
/Assets/Scripts/Star.cs:
--------------------------------------------------------------------------------
1 | using UnityEngine;
2 | using UnityEngine.UI;
3 | using System.Collections;
4 |
5 | public class Star : MonoBehaviour {
6 | public string starName;
7 | public Vector3 coordinates;
8 | public StarSystemDetails starSystemDetails;
9 |
10 | public LineRenderer line;
11 | public Collider col;
12 |
13 | [HideInInspector]
14 | public bool isInView = false;
15 | [HideInInspector]
16 | public Text label;
17 | [HideInInspector]
18 | public RectTransform labelRectTransform;
19 | }
--------------------------------------------------------------------------------
/Assets/Scripts/Star.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 08edf668c3903459ebff6ddb0af2d9c9
3 | MonoImporter:
4 | serializedVersion: 2
5 | defaultReferences: []
6 | executionOrder: 0
7 | icon: {instanceID: 0}
8 | userData:
9 |
--------------------------------------------------------------------------------
/Assets/Scripts/UI Scripts.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 482855539611d487cbca031ba5b91677
3 | folderAsset: yes
4 | DefaultImporter:
5 | userData:
6 |
--------------------------------------------------------------------------------
/Assets/Scripts/UI Scripts/SetInputFieldValue.cs:
--------------------------------------------------------------------------------
1 | using UnityEngine;
2 | using UnityEngine.UI;
3 | using System.Collections;
4 |
5 | [RequireComponent(typeof(InputField))]
6 | public class SetInputFieldValue : MonoBehaviour {
7 |
8 | private InputField inputField;
9 |
10 | void Awake () {
11 | inputField = GetComponent ();
12 | }
13 |
14 | public void SetValue (float value)
15 | {
16 | if (inputField != null)
17 | {
18 | inputField.text = (value.ToString("n2"));
19 | }
20 | }
21 | }
--------------------------------------------------------------------------------
/Assets/Scripts/UI Scripts/SetInputFieldValue.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 3813596dcf6561546b0a38520081ea00
3 | MonoImporter:
4 | serializedVersion: 2
5 | defaultReferences: []
6 | executionOrder: 0
7 | icon: {instanceID: 0}
8 | userData:
9 |
--------------------------------------------------------------------------------
/Assets/Scripts/UI Scripts/SetSliderValue.cs:
--------------------------------------------------------------------------------
1 | using UnityEngine;
2 | using UnityEngine.UI;
3 | using System.Collections;
4 |
5 | [RequireComponent(typeof(Slider))]
6 | public class SetSliderValue : MonoBehaviour {
7 |
8 | private Slider slider;
9 |
10 | void Awake () {
11 | slider = GetComponent();
12 | }
13 |
14 | public void SetValue (string inputValue)
15 | {
16 | slider.value = float.Parse (inputValue);
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/Assets/Scripts/UI Scripts/SetSliderValue.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: fe6d92964eb2fa64ba1e0b3fbbb23c99
3 | MonoImporter:
4 | serializedVersion: 2
5 | defaultReferences: []
6 | executionOrder: 0
7 | icon: {instanceID: 0}
8 | userData:
9 |
--------------------------------------------------------------------------------
/Assets/Scripts/UI Scripts/TogglePanel.cs:
--------------------------------------------------------------------------------
1 | using UnityEngine;
2 | using UnityEngine.UI;
3 | using System.Collections;
4 |
5 | public class TogglePanel : MonoBehaviour {
6 |
7 | public void Toggle ()
8 | {
9 | gameObject.SetActive (!gameObject.activeSelf);;
10 | }
11 | }
--------------------------------------------------------------------------------
/Assets/Scripts/UI Scripts/TogglePanel.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 96cd6cfdb3b6b4848aeabcb007771ea0
3 | MonoImporter:
4 | serializedVersion: 2
5 | defaultReferences: []
6 | executionOrder: 0
7 | icon: {instanceID: 0}
8 | userData:
9 |
--------------------------------------------------------------------------------
/Assets/Scripts/UI Scripts/UIController.cs:
--------------------------------------------------------------------------------
1 | using UnityEngine;
2 | using System.Collections;
3 |
4 | public class UIController : MonoBehaviour {
5 |
6 | public void TogglePanel (GameObject panel) {
7 | panel.SetActive (!panel.activeSelf);
8 | }
9 | }
--------------------------------------------------------------------------------
/Assets/Scripts/UI Scripts/UIController.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 203a6b3f09f8f42aeaec3d6a4e7803dc
3 | MonoImporter:
4 | serializedVersion: 2
5 | defaultReferences: []
6 | executionOrder: 0
7 | icon: {instanceID: 0}
8 | userData:
9 |
--------------------------------------------------------------------------------
/Assets/StarData_20190314.json.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: dba9f0a783c69fa4cb656325b35fc4f5
3 | TextScriptImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/Assets/Typefaces.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 42f94f0bfa6a349b299ad9a853e35620
3 | folderAsset: yes
4 | DefaultImporter:
5 | userData:
6 |
--------------------------------------------------------------------------------
/Assets/Typefaces/Michroma.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SimonDarksideJ/UnityUI-StarMap/deee6e03b30ca0cc265b3556af48e904be2c2daf/Assets/Typefaces/Michroma.ttf
--------------------------------------------------------------------------------
/Assets/Typefaces/Michroma.ttf.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 379987fea13fb48f0ac99f417050973d
3 | TrueTypeFontImporter:
4 | serializedVersion: 2
5 | fontSize: 16
6 | forceTextureCase: -2
7 | characterSpacing: 1
8 | characterPadding: 0
9 | includeFontData: 1
10 | use2xBehaviour: 0
11 | fontNames: []
12 | customCharacters:
13 | fontRenderingMode: 0
14 | userData:
15 |
--------------------------------------------------------------------------------
/Assets/Typefaces/Roboto-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SimonDarksideJ/UnityUI-StarMap/deee6e03b30ca0cc265b3556af48e904be2c2daf/Assets/Typefaces/Roboto-Regular.ttf
--------------------------------------------------------------------------------
/Assets/Typefaces/Roboto-Regular.ttf.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: ae74a0834c76c4503adec48166fb648c
3 | TrueTypeFontImporter:
4 | serializedVersion: 2
5 | fontSize: 16
6 | forceTextureCase: -2
7 | characterSpacing: 1
8 | characterPadding: 0
9 | includeFontData: 1
10 | use2xBehaviour: 0
11 | fontNames: []
12 | customCharacters:
13 | fontRenderingMode: 0
14 | userData:
15 |
--------------------------------------------------------------------------------
/Assets/Typefaces/frau.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SimonDarksideJ/UnityUI-StarMap/deee6e03b30ca0cc265b3556af48e904be2c2daf/Assets/Typefaces/frau.ttf
--------------------------------------------------------------------------------
/Assets/Typefaces/frau.ttf.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: a2fbc257efbd84c7c83a8dbf1d7ab53f
3 | TrueTypeFontImporter:
4 | serializedVersion: 2
5 | fontSize: 16
6 | forceTextureCase: -2
7 | characterSpacing: 1
8 | characterPadding: 0
9 | includeFontData: 1
10 | use2xBehaviour: 0
11 | fontNames: []
12 | customCharacters:
13 | fontRenderingMode: 0
14 | userData:
15 |
--------------------------------------------------------------------------------
/Assets/WebplayerTemplates.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 89dad8902936e4b5897615fc36fa5612
3 | folderAsset: yes
4 | DefaultImporter:
5 | userData:
6 |
--------------------------------------------------------------------------------
/Assets/WebplayerTemplates/Billboard.cs:
--------------------------------------------------------------------------------
1 | using UnityEngine;
2 | using System.Collections;
3 |
4 | public class Billboard : MonoBehaviour {
5 |
6 | private Transform thisTransform;
7 | private Transform mainCameraTransform;
8 |
9 | void Start () {
10 | thisTransform = this.transform;
11 | mainCameraTransform = Camera.main.transform;
12 | }
13 |
14 | void FixedUpdate () {
15 | thisTransform.LookAt(mainCameraTransform.position);
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/Assets/WebplayerTemplates/Billboard.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: d74f6376a4ccb459092cdce9a7048398
3 | MonoImporter:
4 | serializedVersion: 2
5 | defaultReferences: []
6 | executionOrder: 0
7 | icon: {instanceID: 0}
8 | userData:
9 |
--------------------------------------------------------------------------------
/Assets/WebplayerTemplates/TempStarLabel.cs:
--------------------------------------------------------------------------------
1 | using UnityEngine;
2 | using UnityEngine.UI;
3 | using System.Collections;
4 |
5 | public class TempStarLabel : MonoBehaviour {
6 |
7 | public Text label;
8 |
9 | // Use this for initialization
10 | void Start () {
11 | label.text = gameObject.name;
12 | }
13 |
14 | // Update is called once per frame
15 | void Update () {
16 |
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/Assets/WebplayerTemplates/TempStarLabel.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: d2278ff63c12546b89cab2938174bb87
3 | MonoImporter:
4 | serializedVersion: 2
5 | defaultReferences: []
6 | executionOrder: 0
7 | icon: {instanceID: 0}
8 | userData:
9 |
--------------------------------------------------------------------------------
/Assets/_Scenes.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: cbf2434e687ec4f8d8171958fa6abe96
3 | folderAsset: yes
4 | DefaultImporter:
5 | userData:
6 |
--------------------------------------------------------------------------------
/Assets/_Scenes/Main.unity:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SimonDarksideJ/UnityUI-StarMap/deee6e03b30ca0cc265b3556af48e904be2c2daf/Assets/_Scenes/Main.unity
--------------------------------------------------------------------------------
/Assets/_Scenes/Main.unity.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: ba83a7a561db441868bcb30d9b057ffc
3 | DefaultImporter:
4 | userData:
5 |
--------------------------------------------------------------------------------
/Images/DemoScene.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SimonDarksideJ/UnityUI-StarMap/deee6e03b30ca0cc265b3556af48e904be2c2daf/Images/DemoScene.png
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2019 Simon (Darkside) Jackson
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/ProjectSettings/AudioManager.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SimonDarksideJ/UnityUI-StarMap/deee6e03b30ca0cc265b3556af48e904be2c2daf/ProjectSettings/AudioManager.asset
--------------------------------------------------------------------------------
/ProjectSettings/ClusterInputManager.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SimonDarksideJ/UnityUI-StarMap/deee6e03b30ca0cc265b3556af48e904be2c2daf/ProjectSettings/ClusterInputManager.asset
--------------------------------------------------------------------------------
/ProjectSettings/DynamicsManager.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SimonDarksideJ/UnityUI-StarMap/deee6e03b30ca0cc265b3556af48e904be2c2daf/ProjectSettings/DynamicsManager.asset
--------------------------------------------------------------------------------
/ProjectSettings/EditorBuildSettings.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SimonDarksideJ/UnityUI-StarMap/deee6e03b30ca0cc265b3556af48e904be2c2daf/ProjectSettings/EditorBuildSettings.asset
--------------------------------------------------------------------------------
/ProjectSettings/EditorSettings.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SimonDarksideJ/UnityUI-StarMap/deee6e03b30ca0cc265b3556af48e904be2c2daf/ProjectSettings/EditorSettings.asset
--------------------------------------------------------------------------------
/ProjectSettings/GraphicsSettings.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SimonDarksideJ/UnityUI-StarMap/deee6e03b30ca0cc265b3556af48e904be2c2daf/ProjectSettings/GraphicsSettings.asset
--------------------------------------------------------------------------------
/ProjectSettings/InputManager.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SimonDarksideJ/UnityUI-StarMap/deee6e03b30ca0cc265b3556af48e904be2c2daf/ProjectSettings/InputManager.asset
--------------------------------------------------------------------------------
/ProjectSettings/NavMeshAreas.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SimonDarksideJ/UnityUI-StarMap/deee6e03b30ca0cc265b3556af48e904be2c2daf/ProjectSettings/NavMeshAreas.asset
--------------------------------------------------------------------------------
/ProjectSettings/NavMeshLayers.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SimonDarksideJ/UnityUI-StarMap/deee6e03b30ca0cc265b3556af48e904be2c2daf/ProjectSettings/NavMeshLayers.asset
--------------------------------------------------------------------------------
/ProjectSettings/NetworkManager.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SimonDarksideJ/UnityUI-StarMap/deee6e03b30ca0cc265b3556af48e904be2c2daf/ProjectSettings/NetworkManager.asset
--------------------------------------------------------------------------------
/ProjectSettings/Physics2DSettings.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SimonDarksideJ/UnityUI-StarMap/deee6e03b30ca0cc265b3556af48e904be2c2daf/ProjectSettings/Physics2DSettings.asset
--------------------------------------------------------------------------------
/ProjectSettings/PresetManager.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SimonDarksideJ/UnityUI-StarMap/deee6e03b30ca0cc265b3556af48e904be2c2daf/ProjectSettings/PresetManager.asset
--------------------------------------------------------------------------------
/ProjectSettings/ProjectSettings.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SimonDarksideJ/UnityUI-StarMap/deee6e03b30ca0cc265b3556af48e904be2c2daf/ProjectSettings/ProjectSettings.asset
--------------------------------------------------------------------------------
/ProjectSettings/ProjectVersion.txt:
--------------------------------------------------------------------------------
1 | m_EditorVersion: 2018.3.7f1
2 |
--------------------------------------------------------------------------------
/ProjectSettings/QualitySettings.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SimonDarksideJ/UnityUI-StarMap/deee6e03b30ca0cc265b3556af48e904be2c2daf/ProjectSettings/QualitySettings.asset
--------------------------------------------------------------------------------
/ProjectSettings/TagManager.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SimonDarksideJ/UnityUI-StarMap/deee6e03b30ca0cc265b3556af48e904be2c2daf/ProjectSettings/TagManager.asset
--------------------------------------------------------------------------------
/ProjectSettings/TimeManager.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SimonDarksideJ/UnityUI-StarMap/deee6e03b30ca0cc265b3556af48e904be2c2daf/ProjectSettings/TimeManager.asset
--------------------------------------------------------------------------------
/ProjectSettings/UnityConnectSettings.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SimonDarksideJ/UnityUI-StarMap/deee6e03b30ca0cc265b3556af48e904be2c2daf/ProjectSettings/UnityConnectSettings.asset
--------------------------------------------------------------------------------
/ProjectSettings/VFXManager.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SimonDarksideJ/UnityUI-StarMap/deee6e03b30ca0cc265b3556af48e904be2c2daf/ProjectSettings/VFXManager.asset
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # UnityUI-StarMap
2 | Elite Dangerous star viewer using the Unity UI System
3 |
4 | Simple UI setup demonstrating placing Unity UI objects relative to a 3D scene and optimizing for displaying only items in view.
5 |
6 | 
7 |
8 | # Demo
9 |
10 | Check out Adam's awesome [UI Live training session](https://youtu.be/0L-Y8dPJHDM), check full of UI goodness.
11 |
12 | For the Map / UI demo, it starts at 57:06 - [View Video](https://youtu.be/0L-Y8dPJHDM?t=3426)
13 |
14 | # Attributions
15 |
16 | Big thanks to Adam Buckner of Unity for the source project (been begging him for ages to drag it out of the closet)
--------------------------------------------------------------------------------