Skip to content

Commit

Permalink
Create tile assets from sprites
Browse files Browse the repository at this point in the history
  • Loading branch information
adamgraham committed Aug 8, 2021
1 parent dfdabf2 commit 6ba5316
Show file tree
Hide file tree
Showing 20 changed files with 1,508 additions and 2 deletions.
832 changes: 830 additions & 2 deletions Assets/Scenes/Tetris.unity

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions Assets/Tiles.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

311 changes: 311 additions & 0 deletions Assets/Tiles/Blocks.prefab
Original file line number Diff line number Diff line change
@@ -0,0 +1,311 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &4442038887208273871
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 4198507236585720799}
- component: {fileID: 5835910971353386228}
m_Layer: 31
m_Name: Blocks
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &4198507236585720799
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4442038887208273871}
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: 7588981626310639142}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!156049354 &5835910971353386228
Grid:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4442038887208273871}
m_Enabled: 1
m_CellSize: {x: 1, y: 1, z: 0}
m_CellGap: {x: 0, y: 0, z: 0}
m_CellLayout: 0
m_CellSwizzle: 0
--- !u!1 &6795079444853065573
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 7588981626310639142}
- component: {fileID: 181651932633356770}
- component: {fileID: 556346316875449304}
m_Layer: 0
m_Name: Layer1
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &7588981626310639142
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6795079444853065573}
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: []
m_Father: {fileID: 4198507236585720799}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1839735485 &181651932633356770
Tilemap:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6795079444853065573}
m_Enabled: 1
m_Tiles:
- first: {x: -1, y: -2, z: 0}
second:
serializedVersion: 2
m_TileIndex: 6
m_TileSpriteIndex: 6
m_TileMatrixIndex: 0
m_TileColorIndex: 0
m_TileObjectToInstantiateIndex: 65535
dummyAlignment: 0
m_AllTileFlags: 1073741825
- first: {x: 0, y: -2, z: 0}
second:
serializedVersion: 2
m_TileIndex: 7
m_TileSpriteIndex: 7
m_TileMatrixIndex: 0
m_TileColorIndex: 0
m_TileObjectToInstantiateIndex: 65535
dummyAlignment: 0
m_AllTileFlags: 1073741825
- first: {x: -1, y: -1, z: 0}
second:
serializedVersion: 2
m_TileIndex: 3
m_TileSpriteIndex: 3
m_TileMatrixIndex: 0
m_TileColorIndex: 0
m_TileObjectToInstantiateIndex: 65535
dummyAlignment: 0
m_AllTileFlags: 1073741825
- first: {x: 0, y: -1, z: 0}
second:
serializedVersion: 2
m_TileIndex: 4
m_TileSpriteIndex: 4
m_TileMatrixIndex: 0
m_TileColorIndex: 0
m_TileObjectToInstantiateIndex: 65535
dummyAlignment: 0
m_AllTileFlags: 1073741825
- first: {x: 1, y: -1, z: 0}
second:
serializedVersion: 2
m_TileIndex: 5
m_TileSpriteIndex: 5
m_TileMatrixIndex: 0
m_TileColorIndex: 0
m_TileObjectToInstantiateIndex: 65535
dummyAlignment: 0
m_AllTileFlags: 1073741825
- first: {x: -1, y: 0, z: 0}
second:
serializedVersion: 2
m_TileIndex: 0
m_TileSpriteIndex: 0
m_TileMatrixIndex: 0
m_TileColorIndex: 0
m_TileObjectToInstantiateIndex: 65535
dummyAlignment: 0
m_AllTileFlags: 1073741825
- first: {x: 0, y: 0, z: 0}
second:
serializedVersion: 2
m_TileIndex: 1
m_TileSpriteIndex: 1
m_TileMatrixIndex: 0
m_TileColorIndex: 0
m_TileObjectToInstantiateIndex: 65535
dummyAlignment: 0
m_AllTileFlags: 1073741825
- first: {x: 1, y: 0, z: 0}
second:
serializedVersion: 2
m_TileIndex: 2
m_TileSpriteIndex: 2
m_TileMatrixIndex: 0
m_TileColorIndex: 0
m_TileObjectToInstantiateIndex: 65535
dummyAlignment: 0
m_AllTileFlags: 1073741825
m_AnimatedTiles: {}
m_TileAssetArray:
- m_RefCount: 1
m_Data: {fileID: 11400000, guid: f6c4109fd0d185b419e5e665b07c42f0, type: 2}
- m_RefCount: 1
m_Data: {fileID: 11400000, guid: aa44b5216a5f39e4881c5323564afe81, type: 2}
- m_RefCount: 1
m_Data: {fileID: 11400000, guid: 9e2688d592617d44ea74683c8f61accf, type: 2}
- m_RefCount: 1
m_Data: {fileID: 11400000, guid: ae5c5dcd9d2744248ba2beb6b8dab80f, type: 2}
- m_RefCount: 1
m_Data: {fileID: 11400000, guid: 89eae29ecf56ea14c8b3927213a00066, type: 2}
- m_RefCount: 1
m_Data: {fileID: 11400000, guid: 8316c87896e7b6448a324d8a66e43174, type: 2}
- m_RefCount: 1
m_Data: {fileID: 11400000, guid: be0a34e2a842ae742b4fa8541a5f9fcf, type: 2}
- m_RefCount: 1
m_Data: {fileID: 11400000, guid: 66df2645ff909154b9c8f7c006a6af32, type: 2}
m_TileSpriteArray:
- m_RefCount: 1
m_Data: {fileID: 21300000, guid: 3f82b3ad9020ed3448c74b89545d893c, type: 3}
- m_RefCount: 1
m_Data: {fileID: 21300000, guid: 774fa586ba243f54f92bce708ecb917b, type: 3}
- m_RefCount: 1
m_Data: {fileID: 21300000, guid: 201aebd630f12cf41bd9524548e38803, type: 3}
- m_RefCount: 1
m_Data: {fileID: 21300000, guid: 3e2fc5b3b3411a94d990b263cc821a0a, type: 3}
- m_RefCount: 1
m_Data: {fileID: 21300000, guid: 35a3a47936e735945aca498f718eaef4, type: 3}
- m_RefCount: 1
m_Data: {fileID: 21300000, guid: 51a1485338acae84585e3ea525804668, type: 3}
- m_RefCount: 1
m_Data: {fileID: 21300000, guid: b109e0a46ebdde140abbe8ffe76f424c, type: 3}
- m_RefCount: 1
m_Data: {fileID: 21300000, guid: 019e0880cb7a5b04e9397e93cddcc382, type: 3}
m_TileMatrixArray:
- m_RefCount: 8
m_Data:
e00: 1
e01: 0
e02: 0
e03: 0
e10: 0
e11: 1
e12: 0
e13: 0
e20: 0
e21: 0
e22: 1
e23: 0
e30: 0
e31: 0
e32: 0
e33: 1
m_TileColorArray:
- m_RefCount: 8
m_Data: {r: 1, g: 1, b: 1, a: 1}
m_TileObjectToInstantiateArray: []
m_AnimationFrameRate: 1
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_Origin: {x: -1, y: -2, z: 0}
m_Size: {x: 3, y: 3, z: 1}
m_TileAnchor: {x: 0.5, y: 0.5, z: 0}
m_TileOrientation: 0
m_TileOrientationMatrix:
e00: 1
e01: 0
e02: 0
e03: 0
e10: 0
e11: 1
e12: 0
e13: 0
e20: 0
e21: 0
e22: 1
e23: 0
e30: 0
e31: 0
e32: 0
e33: 1
--- !u!483693784 &556346316875449304
TilemapRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6795079444853065573}
m_Enabled: 1
m_CastShadows: 0
m_ReceiveShadows: 0
m_DynamicOccludee: 0
m_MotionVectors: 1
m_LightProbeUsage: 0
m_ReflectionProbeUsage: 0
m_RayTracingMode: 0
m_RayTraceProcedural: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 1
m_SelectedEditorRenderState: 0
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_ChunkSize: {x: 32, y: 32, z: 32}
m_ChunkCullingBounds: {x: 0, y: 0, z: 0}
m_MaxChunkCount: 16
m_MaxFrameAge: 16
m_SortOrder: 0
m_Mode: 0
m_DetectChunkCullingBounds: 0
m_MaskInteraction: 0
--- !u!114 &8295858695920005497
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 12395, guid: 0000000000000000e000000000000000, type: 0}
m_Name: Palette Settings
m_EditorClassIdentifier:
cellSizing: 0
m_TransparencySortMode: 0
m_TransparencySortAxis: {x: 0, y: 0, z: 1}
7 changes: 7 additions & 0 deletions Assets/Tiles/Blocks.prefab.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

36 changes: 36 additions & 0 deletions Assets/Tiles/Blue.asset
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 13312, guid: 0000000000000000e000000000000000, type: 0}
m_Name: Blue
m_EditorClassIdentifier:
m_Sprite: {fileID: 21300000, guid: 3f82b3ad9020ed3448c74b89545d893c, type: 3}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_Transform:
e00: 1
e01: 0
e02: 0
e03: 0
e10: 0
e11: 1
e12: 0
e13: 0
e20: 0
e21: 0
e22: 1
e23: 0
e30: 0
e31: 0
e32: 0
e33: 1
m_InstancedGameObject: {fileID: 0}
m_Flags: 1
m_ColliderType: 1
8 changes: 8 additions & 0 deletions Assets/Tiles/Blue.asset.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 6ba5316

Please sign in to comment.