Imported basic unity packages yeehaw
This commit is contained in:
8
Assets/StarterAssets/TutorialInfo/Icons.meta
Normal file
8
Assets/StarterAssets/TutorialInfo/Icons.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2061ae1d08d066d45be1f817df5bf2f1
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/StarterAssets/TutorialInfo/Icons/ReadMeImg.PNG
(Stored with Git LFS)
Normal file
BIN
Assets/StarterAssets/TutorialInfo/Icons/ReadMeImg.PNG
(Stored with Git LFS)
Normal file
Binary file not shown.
96
Assets/StarterAssets/TutorialInfo/Icons/ReadMeImg.PNG.meta
Normal file
96
Assets/StarterAssets/TutorialInfo/Icons/ReadMeImg.PNG.meta
Normal file
@@ -0,0 +1,96 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 44a17a5b205fcd349a24700e6f5615bd
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 11
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 1
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: -1
|
||||
aniso: -1
|
||||
mipBias: -100
|
||||
wrapU: -1
|
||||
wrapV: -1
|
||||
wrapW: -1
|
||||
nPOTScale: 1
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 0
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 100
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 0
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 0
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 3
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID:
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
spritePackingTag:
|
||||
pSDRemoveMatte: 0
|
||||
pSDShowRemoveMatteOption: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
Assets/StarterAssets/TutorialInfo/Scripts.meta
Normal file
8
Assets/StarterAssets/TutorialInfo/Scripts.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7f187f55f7f6920439a9204ab8e58e85
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
Assets/StarterAssets/TutorialInfo/Scripts/Editor.meta
Normal file
8
Assets/StarterAssets/TutorialInfo/Scripts/Editor.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 84f9cd99045693143ba5ab37d0952aa5
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
158
Assets/StarterAssets/TutorialInfo/Scripts/Editor/ReadmeEditor.cs
Normal file
158
Assets/StarterAssets/TutorialInfo/Scripts/Editor/ReadmeEditor.cs
Normal file
@@ -0,0 +1,158 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEditor;
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
|
||||
[CustomEditor(typeof(Readme))]
|
||||
[InitializeOnLoad]
|
||||
public class ReadmeEditor : Editor {
|
||||
|
||||
static string kShowedReadmeSessionStateName = "ReadmeEditor.showedReadme";
|
||||
|
||||
static float kSpace = 16f;
|
||||
|
||||
static ReadmeEditor()
|
||||
{
|
||||
EditorApplication.delayCall += SelectReadmeAutomatically;
|
||||
}
|
||||
|
||||
static void SelectReadmeAutomatically()
|
||||
{
|
||||
if (!SessionState.GetBool(kShowedReadmeSessionStateName, false ))
|
||||
{
|
||||
var readme = SelectReadme();
|
||||
SessionState.SetBool(kShowedReadmeSessionStateName, true);
|
||||
|
||||
if (readme && !readme.loadedLayout)
|
||||
{
|
||||
LoadLayout();
|
||||
readme.loadedLayout = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void LoadLayout()
|
||||
{
|
||||
var assembly = typeof(EditorApplication).Assembly;
|
||||
var windowLayoutType = assembly.GetType("UnityEditor.WindowLayout", true);
|
||||
var method = windowLayoutType.GetMethod("LoadWindowLayout", BindingFlags.Public | BindingFlags.Static);
|
||||
method.Invoke(null, new object[]{Path.Combine(Application.dataPath, "TutorialInfo/Layout.wlt"), false});
|
||||
}
|
||||
|
||||
[MenuItem("Tutorial/Show Tutorial Instructions")]
|
||||
static Readme SelectReadme()
|
||||
{
|
||||
var ids = AssetDatabase.FindAssets("Readme t:Readme");
|
||||
if (ids.Length == 1)
|
||||
{
|
||||
var readmeObject = AssetDatabase.LoadMainAssetAtPath(AssetDatabase.GUIDToAssetPath(ids[0]));
|
||||
|
||||
Selection.objects = new UnityEngine.Object[]{readmeObject};
|
||||
|
||||
return (Readme)readmeObject;
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Log("Couldn't find a readme");
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
protected override void OnHeaderGUI()
|
||||
{
|
||||
var readme = (Readme)target;
|
||||
Init();
|
||||
|
||||
var iconWidth = Mathf.Min(EditorGUIUtility.currentViewWidth/3f - 20f, 128f);
|
||||
|
||||
GUILayout.BeginHorizontal("In BigTitle");
|
||||
{
|
||||
GUILayout.Label(readme.icon, GUILayout.Width(iconWidth), GUILayout.Height(iconWidth));
|
||||
GUILayout.Label(readme.title, TitleStyle);
|
||||
}
|
||||
GUILayout.EndHorizontal();
|
||||
}
|
||||
|
||||
public override void OnInspectorGUI()
|
||||
{
|
||||
var readme = (Readme)target;
|
||||
Init();
|
||||
|
||||
foreach (var section in readme.sections)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(section.heading))
|
||||
{
|
||||
GUILayout.Label(section.heading, HeadingStyle);
|
||||
}
|
||||
if (!string.IsNullOrEmpty(section.text))
|
||||
{
|
||||
GUILayout.Label(section.text, BodyStyle);
|
||||
}
|
||||
if (!string.IsNullOrEmpty(section.linkText))
|
||||
{
|
||||
if (LinkLabel(new GUIContent(section.linkText)))
|
||||
{
|
||||
Application.OpenURL(section.url);
|
||||
}
|
||||
}
|
||||
GUILayout.Space(kSpace);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
bool m_Initialized;
|
||||
|
||||
GUIStyle LinkStyle { get { return m_LinkStyle; } }
|
||||
[SerializeField] GUIStyle m_LinkStyle;
|
||||
|
||||
GUIStyle TitleStyle { get { return m_TitleStyle; } }
|
||||
[SerializeField] GUIStyle m_TitleStyle;
|
||||
|
||||
GUIStyle HeadingStyle { get { return m_HeadingStyle; } }
|
||||
[SerializeField] GUIStyle m_HeadingStyle;
|
||||
|
||||
GUIStyle BodyStyle { get { return m_BodyStyle; } }
|
||||
[SerializeField] GUIStyle m_BodyStyle;
|
||||
|
||||
void Init()
|
||||
{
|
||||
if (m_Initialized)
|
||||
return;
|
||||
m_BodyStyle = new GUIStyle(EditorStyles.label);
|
||||
m_BodyStyle.wordWrap = true;
|
||||
m_BodyStyle.fontSize = 14;
|
||||
|
||||
m_TitleStyle = new GUIStyle(m_BodyStyle);
|
||||
m_TitleStyle.fontSize = 26;
|
||||
|
||||
m_HeadingStyle = new GUIStyle(m_BodyStyle);
|
||||
m_HeadingStyle.fontSize = 18 ;
|
||||
|
||||
m_LinkStyle = new GUIStyle(m_BodyStyle);
|
||||
m_LinkStyle.wordWrap = false;
|
||||
// Match selection color which works nicely for both light and dark skins
|
||||
m_LinkStyle.normal.textColor = new Color (0x00/255f, 0x78/255f, 0xDA/255f, 1f);
|
||||
m_LinkStyle.stretchWidth = false;
|
||||
|
||||
m_Initialized = true;
|
||||
}
|
||||
|
||||
bool LinkLabel (GUIContent label, params GUILayoutOption[] options)
|
||||
{
|
||||
var position = GUILayoutUtility.GetRect(label, LinkStyle, options);
|
||||
|
||||
Handles.BeginGUI ();
|
||||
Handles.color = LinkStyle.normal.textColor;
|
||||
Handles.DrawLine (new Vector3(position.xMin, position.yMax), new Vector3(position.xMax, position.yMax));
|
||||
Handles.color = Color.white;
|
||||
Handles.EndGUI ();
|
||||
|
||||
EditorGUIUtility.AddCursorRect (position, MouseCursor.Link);
|
||||
|
||||
return GUI.Button (position, label, LinkStyle);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 476cc7d7cd9874016adc216baab94a0a
|
||||
timeCreated: 1484146680
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
14
Assets/StarterAssets/TutorialInfo/Scripts/Readme.cs
Normal file
14
Assets/StarterAssets/TutorialInfo/Scripts/Readme.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
public class Readme : ScriptableObject {
|
||||
public Texture2D icon;
|
||||
public string title;
|
||||
public Section[] sections;
|
||||
public bool loadedLayout;
|
||||
|
||||
[Serializable]
|
||||
public class Section {
|
||||
public string heading, text, linkText, url;
|
||||
}
|
||||
}
|
||||
12
Assets/StarterAssets/TutorialInfo/Scripts/Readme.cs.meta
Normal file
12
Assets/StarterAssets/TutorialInfo/Scripts/Readme.cs.meta
Normal file
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: fcf7219bab7fe46a1ad266029b2fee19
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences:
|
||||
- icon: {fileID: 2800000, guid: d4743ba2e2a59f946b2125c074582ce7, type: 3}
|
||||
executionOrder: 0
|
||||
icon: {fileID: 2800000, guid: a186f8a87ca4f4d3aa864638ad5dfb65, type: 3}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user