Browse Source

Added Create > Fungus Logo menu option

Fixed spawned objects not centering in scene view
master
chrisgregan 9 years ago
parent
commit
ce69debb61
  1. 8
      Assets/Fungus/Flowchart/Editor/FlowchartMenuItems.cs
  2. 122
      Assets/Fungus/Flowchart/Resources/FungusLogo.prefab
  3. 8
      Assets/Fungus/Flowchart/Resources/FungusLogo.prefab.meta
  4. BIN
      Assets/Fungus/Flowchart/Sprites/CreatedWith.psd
  5. 55
      Assets/Fungus/Flowchart/Sprites/CreatedWith.psd.meta
  6. BIN
      Assets/Fungus/Flowchart/Sprites/FungusLogo.png
  7. 55
      Assets/Fungus/Flowchart/Sprites/FungusLogo.png.meta

8
Assets/Fungus/Flowchart/Editor/FlowchartMenuItems.cs

@ -15,6 +15,12 @@ namespace Fungus
go.transform.position = Vector3.zero;
}
[MenuItem("Tools/Fungus/Create/Fungus Logo", false, 1000)]
static void CreateFungusLogo()
{
SpawnPrefab("FungusLogo");
}
public static GameObject SpawnPrefab(string prefabName)
{
GameObject prefab = Resources.Load<GameObject>(prefabName);
@ -26,7 +32,7 @@ namespace Fungus
GameObject go = PrefabUtility.InstantiatePrefab(prefab) as GameObject;
PrefabUtility.DisconnectPrefabInstance(go);
SceneView view = SceneView.currentDrawingSceneView;
SceneView view = SceneView.lastActiveSceneView;
if (view != null)
{
Camera sceneCam = view.camera;

122
Assets/Fungus/Flowchart/Resources/FungusLogo.prefab

@ -0,0 +1,122 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &158064
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 4
m_Component:
- 4: {fileID: 406310}
- 212: {fileID: 21216416}
m_Layer: 0
m_Name: FungusLogo
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!1 &181890
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 4
m_Component:
- 4: {fileID: 454942}
- 212: {fileID: 21226848}
m_Layer: 0
m_Name: CreatedWith
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &406310
Transform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 158064}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 454942}
m_Father: {fileID: 0}
m_RootOrder: 0
--- !u!4 &454942
Transform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 181890}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: .479999989, y: 2.01999998, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 406310}
m_RootOrder: 0
--- !u!212 &21216416
SpriteRenderer:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 158064}
m_Enabled: 1
m_CastShadows: 0
m_ReceiveShadows: 0
m_Materials:
- {fileID: 10754, guid: 0000000000000000e000000000000000, type: 0}
m_SubsetIndices:
m_StaticBatchRoot: {fileID: 0}
m_UseLightProbes: 0
m_ReflectionProbeUsage: 0
m_ProbeAnchor: {fileID: 0}
m_ScaleInLightmap: 1
m_PreserveUVs: 0
m_ImportantGI: 0
m_AutoUVMaxDistance: .5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingOrder: 0
m_Sprite: {fileID: 21300000, guid: 1b656a189e6154422a74e05a56c3f245, type: 3}
m_Color: {r: 1, g: 1, b: 1, a: 1}
--- !u!212 &21226848
SpriteRenderer:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 181890}
m_Enabled: 1
m_CastShadows: 0
m_ReceiveShadows: 0
m_Materials:
- {fileID: 10754, guid: 0000000000000000e000000000000000, type: 0}
m_SubsetIndices:
m_StaticBatchRoot: {fileID: 0}
m_UseLightProbes: 0
m_ReflectionProbeUsage: 0
m_ProbeAnchor: {fileID: 0}
m_ScaleInLightmap: 1
m_PreserveUVs: 0
m_ImportantGI: 0
m_AutoUVMaxDistance: .5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingOrder: 0
m_Sprite: {fileID: 21300000, guid: 7adcbbe62d6554d81affcab2c56ad5ac, type: 3}
m_Color: {r: 1, g: 1, b: 1, a: 1}
--- !u!1001 &100100000
Prefab:
m_ObjectHideFlags: 1
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications: []
m_RemovedComponents: []
m_ParentPrefab: {fileID: 0}
m_RootGameObject: {fileID: 158064}
m_IsPrefabParent: 1

8
Assets/Fungus/Flowchart/Resources/FungusLogo.prefab.meta

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 613b99a82fe95405db46062e1c071434
timeCreated: 1441210481
licenseType: Free
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:

BIN
Assets/Fungus/Flowchart/Sprites/CreatedWith.psd

Binary file not shown.

55
Assets/Fungus/Flowchart/Sprites/CreatedWith.psd.meta

@ -0,0 +1,55 @@
fileFormatVersion: 2
guid: 7adcbbe62d6554d81affcab2c56ad5ac
timeCreated: 1441227623
licenseType: Free
TextureImporter:
fileIDToRecycleName: {}
serializedVersion: 2
mipmaps:
mipMapMode: 0
enableMipMap: 1
linearTexture: 0
correctGamma: 0
fadeOut: 0
borderMipMap: 0
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: .25
normalMapFilter: 0
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 0
cubemapConvolution: 0
cubemapConvolutionSteps: 8
cubemapConvolutionExponent: 1.5
seamlessCubemap: 0
textureFormat: -1
maxTextureSize: 2048
textureSettings:
filterMode: -1
aniso: -1
mipBias: -1
wrapMode: 1
nPOTScale: 0
lightmap: 0
rGBM: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: .5, y: .5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100
alphaIsTransparency: 1
textureType: 8
buildTargetSettings: []
spriteSheet:
sprites: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:

BIN
Assets/Fungus/Flowchart/Sprites/FungusLogo.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 167 KiB

55
Assets/Fungus/Flowchart/Sprites/FungusLogo.png.meta

@ -0,0 +1,55 @@
fileFormatVersion: 2
guid: 1b656a189e6154422a74e05a56c3f245
timeCreated: 1441227081
licenseType: Free
TextureImporter:
fileIDToRecycleName: {}
serializedVersion: 2
mipmaps:
mipMapMode: 0
enableMipMap: 1
linearTexture: 0
correctGamma: 0
fadeOut: 0
borderMipMap: 0
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: .25
normalMapFilter: 0
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 0
cubemapConvolution: 0
cubemapConvolutionSteps: 8
cubemapConvolutionExponent: 1.5
seamlessCubemap: 0
textureFormat: -1
maxTextureSize: 2048
textureSettings:
filterMode: -1
aniso: -1
mipBias: -1
wrapMode: 1
nPOTScale: 0
lightmap: 0
rGBM: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: .5, y: .5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100
alphaIsTransparency: 1
textureType: 8
buildTargetSettings: []
spriteSheet:
sprites: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:
Loading…
Cancel
Save