Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
avvy
mobile-app
Commits
83f71d3b
Commit
83f71d3b
authored
4 years ago
by
Sally552sally
Browse files
Options
Download
Email Patches
Plain Diff
прозрачный материал для блоков. внес правки
parent
745fa70a
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
Assets/AddressableAssetsData/Android/addressables_content_state.bin
+0
-0
...ressableAssetsData/Android/addressables_content_state.bin
Assets/DomiDo/AvvyLand/Blocks/BlocksSettings/Transparent.asset
+2
-2
...s/DomiDo/AvvyLand/Blocks/BlocksSettings/Transparent.asset
Assets/DomiDo/AvvyLand/Materials/TtransparenMaterial.mat
+77
-0
Assets/DomiDo/AvvyLand/Materials/TtransparenMaterial.mat
Assets/DomiDo/AvvyLand/Materials/TtransparenMaterial.mat.meta
+8
-0
...ts/DomiDo/AvvyLand/Materials/TtransparenMaterial.mat.meta
Assets/DomiDo/AvvyLand/Scenes/AR.unity
+2
-14
Assets/DomiDo/AvvyLand/Scenes/AR.unity
Assets/DomiDo/AvvyLand/Scripts/AR/World/System/Execute/ExecuteCreateSystemGroup/CreateBlockSystem.cs
+1
-1
...tem/Execute/ExecuteCreateSystemGroup/CreateBlockSystem.cs
Assets/DomiDo/AvvyLand/Scripts/Sculpt/PointAndClickUX.cs
+14
-16
Assets/DomiDo/AvvyLand/Scripts/Sculpt/PointAndClickUX.cs
with
104 additions
and
33 deletions
+104
-33
Assets/AddressableAssetsData/Android/addressables_content_state.bin
View file @
83f71d3b
No preview for this file type
This diff is collapsed.
Click to expand it.
Assets/DomiDo/AvvyLand/Blocks/BlocksSettings/Transparent.asset
View file @
83f71d3b
...
...
@@ -14,5 +14,5 @@ MonoBehaviour:
m_EditorClassIdentifier
:
BlockType
:
255
mesh
:
{
fileID
:
-1747488100808942408
,
guid
:
43c56d6243a257b4f99c230ff50b64f2
,
type
:
3
}
material
:
{
fileID
:
2100000
,
guid
:
497423d004c7f44f690e8f82bed81904
,
type
:
2
}
previewTexture
:
{
fileID
:
0
}
material
:
{
fileID
:
2100000
,
guid
:
cb5b686da0170f84f8c7d353447849a6
,
type
:
2
}
previewTexture
:
{
fileID
:
21300000
,
guid
:
431520a99829942e7b09243f457b2ade
,
type
:
3
}
This diff is collapsed.
Click to expand it.
Assets/DomiDo/AvvyLand/Materials/TtransparenMaterial.mat
0 → 100644
View file @
83f71d3b
%YAML
1.1
%TAG
!u!
tag:unity3d.com,2011:
---
!u!21
&2100000
Material
:
serializedVersion
:
6
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_Name
:
TtransparenMaterial
m_Shader
:
{
fileID
:
4800000
,
guid
:
abcf973b8dc974208a882fe4b8c6b73f
,
type
:
3
}
m_ShaderKeywords
:
m_LightmapFlags
:
4
m_EnableInstancingVariants
:
0
m_DoubleSidedGI
:
0
m_CustomRenderQueue
:
-1
stringTagMap
:
{}
disabledShaderPasses
:
[]
m_SavedProperties
:
serializedVersion
:
3
m_TexEnvs
:
-
_BumpMap
:
m_Texture
:
{
fileID
:
0
}
m_Scale
:
{
x
:
1
,
y
:
1
}
m_Offset
:
{
x
:
0
,
y
:
0
}
-
_DetailAlbedoMap
:
m_Texture
:
{
fileID
:
0
}
m_Scale
:
{
x
:
1
,
y
:
1
}
m_Offset
:
{
x
:
0
,
y
:
0
}
-
_DetailMask
:
m_Texture
:
{
fileID
:
0
}
m_Scale
:
{
x
:
1
,
y
:
1
}
m_Offset
:
{
x
:
0
,
y
:
0
}
-
_DetailNormalMap
:
m_Texture
:
{
fileID
:
0
}
m_Scale
:
{
x
:
1
,
y
:
1
}
m_Offset
:
{
x
:
0
,
y
:
0
}
-
_EmissionMap
:
m_Texture
:
{
fileID
:
0
}
m_Scale
:
{
x
:
1
,
y
:
1
}
m_Offset
:
{
x
:
0
,
y
:
0
}
-
_MainTex
:
m_Texture
:
{
fileID
:
0
}
m_Scale
:
{
x
:
1
,
y
:
1
}
m_Offset
:
{
x
:
0
,
y
:
0
}
-
_MetallicGlossMap
:
m_Texture
:
{
fileID
:
0
}
m_Scale
:
{
x
:
1
,
y
:
1
}
m_Offset
:
{
x
:
0
,
y
:
0
}
-
_OcclusionMap
:
m_Texture
:
{
fileID
:
0
}
m_Scale
:
{
x
:
1
,
y
:
1
}
m_Offset
:
{
x
:
0
,
y
:
0
}
-
_ParallaxMap
:
m_Texture
:
{
fileID
:
0
}
m_Scale
:
{
x
:
1
,
y
:
1
}
m_Offset
:
{
x
:
0
,
y
:
0
}
m_Floats
:
-
_BumpScale
:
1
-
_Cutoff
:
0.5
-
_DetailNormalMapScale
:
1
-
_DstBlend
:
0
-
_GlossMapScale
:
1
-
_Glossiness
:
0.5
-
_GlossyReflections
:
1
-
_Metallic
:
0
-
_Mode
:
0
-
_OcclusionStrength
:
1
-
_Parallax
:
0.02
-
_SmoothnessTextureChannel
:
0
-
_SpecularHighlights
:
1
-
_SrcBlend
:
1
-
_UVSec
:
0
-
_ZWrite
:
1
m_Colors
:
-
_Color
:
{
r
:
1
,
g
:
1
,
b
:
1
,
a
:
1
}
-
_EmissionColor
:
{
r
:
0
,
g
:
0
,
b
:
0
,
a
:
1
}
This diff is collapsed.
Click to expand it.
Assets/DomiDo/AvvyLand/Materials/TtransparenMaterial.mat.meta
0 → 100644
View file @
83f71d3b
fileFormatVersion: 2
guid: cb5b686da0170f84f8c7d353447849a6
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 0
userData:
assetBundleName:
assetBundleVariant:
This diff is collapsed.
Click to expand it.
Assets/DomiDo/AvvyLand/Scenes/AR.unity
View file @
83f71d3b
...
...
@@ -18944,7 +18944,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID:
0
}
m_Material: {fileID:
4800000, guid: e7c77f6eaab324a819efdc13b8125a39, type: 3
}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_OnCullStateChanged:
...
...
@@ -18963,7 +18963,7 @@ MonoBehaviour:
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text:
Map
m_Text:
"\u0101"
--- !u!114 &114427239554927153
MonoBehaviour:
m_ObjectHideFlags: 0
...
...
@@ -20558,18 +20558,6 @@ PrefabInstance:
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 1616708583, guid: 0a3837193bc7899469035caad6857474, type: 3}
propertyPath: m_LocalScale.x
value: 0.1
objectReference: {fileID: 0}
- target: {fileID: 1616708583, guid: 0a3837193bc7899469035caad6857474, type: 3}
propertyPath: m_LocalScale.y
value: 0.1
objectReference: {fileID: 0}
- target: {fileID: 1616708583, guid: 0a3837193bc7899469035caad6857474, type: 3}
propertyPath: m_LocalScale.z
value: 0.1
objectReference: {fileID: 0}
- target: {fileID: 1619206530, guid: 0a3837193bc7899469035caad6857474, type: 3}
propertyPath: floor
value:
...
...
This diff is collapsed.
Click to expand it.
Assets/DomiDo/AvvyLand/Scripts/AR/World/System/Execute/ExecuteCreateSystemGroup/CreateBlockSystem.cs
View file @
83f71d3b
...
...
@@ -49,7 +49,7 @@ namespace AvvyLand.AR.World.System
{
Center
=
meshRenderer
.
mesh
.
bounds
.
center
,
Orientation
=
quaternion
.
identity
,
Size
=
2
*
Vector3
.
one
*
VoxelHelper
.
BLOCK_SIZE
,
//meshRenderer.mesh.bounds.extents,
Size
=
2
*
Vector3
.
one
*
VoxelHelper
.
BLOCK_SIZE
,
//meshRenderer.mesh.bounds.extents,
BevelRadius
=
0
});
colliderCopy
.
Value
.
Filter
=
CollisionFilter
.
Default
;
...
...
This diff is collapsed.
Click to expand it.
Assets/DomiDo/AvvyLand/Scripts/Sculpt/PointAndClickUX.cs
View file @
83f71d3b
...
...
@@ -49,6 +49,8 @@ public class PointAndClickUX : MonoBehaviour
ShowBlock
(
currentRemoveBlockPosition
,
buttonsController
.
CurrentBlockSelect
.
BlockType
);
currentRemoveBlockPosition
=
Vector3
.
positiveInfinity
;
}
else
ResetCubePosition
();
uiState
.
StructureState
=
(
uiState
.
StructureState
==
ARStructureState
.
Delete
)
?
ARStructureState
.
Idle
:
ARStructureState
.
Delete
;
DestroyBlockActive
.
gameObject
.
SetActive
(
uiState
.
StructureState
==
ARStructureState
.
Delete
);
...
...
@@ -153,12 +155,6 @@ public class PointAndClickUX : MonoBehaviour
ResetCubePosition
();
}
/* if (Input.GetMouseButtonDown(0))
{
ShowBlock(targetPosition);
}*/
}
else
ResetCubePosition
();
...
...
@@ -172,26 +168,27 @@ public class PointAndClickUX : MonoBehaviour
}
private
Vector3
currentRemoveBlockPosition
=
Vector3
.
positiveInfinity
;
private
byte
currentHideBLockType
;
private
void
DeleteBlock
()
{
if
(
currentRemoveBlockPosition
!=
rayCastSystem
.
GetCurrentEntityPosition
())
{
if
(
currentRemoveBlockPosition
.
x
!=
Mathf
.
Infinity
)
{
Debug
.
Log
(
"SHOW"
);
ShowBlock
(
currentRemoveBlockPosition
,
buttonsController
.
CurrentBlockSelect
.
BlockType
);
ShowBlock
(
currentRemoveBlockPosition
,
currentHideBLockType
);
ResetCubePosition
();
}
currentRemoveBlockPosition
=
rayCastSystem
.
GetCurrentEntityPosition
();
if
(
currentRemoveBlockPosition
.
x
!=
Mathf
.
Infinity
)
{
Debug
.
Log
(
"Hide"
);
currentHideBLockType
=
GetTypeBLockHide
(
rayCastSystem
.
currentEntity
);
targetCube
.
transform
.
position
=
currentRemoveBlockPosition
;
HideBlock
(
currentRemoveBlockPosition
);
}
else
ResetCubePosition
();
}
...
...
@@ -208,7 +205,6 @@ public class PointAndClickUX : MonoBehaviour
currentRemoveBlockPosition
=
Vector3
.
positiveInfinity
;
if
(
rayCastSystem
.
currentEntity
!=
Entity
.
Null
)
{
// entityManager.RemoveComponent<PhysicsCollider>(rayCastSystem.currentEntity);
RemoveBlock
(
currentRemoveBlockPosition
);
ResetCubePosition
();
}
...
...
@@ -218,13 +214,17 @@ public class PointAndClickUX : MonoBehaviour
if
(
Input
.
GetMouseButtonDown
(
0
))
{
RemoveBlock
(
currentRemoveBlockPosition
);
// entityManager.RemoveComponent<PhysicsCollider>(rayCastSystem.currentEntity);
ResetCubePosition
();
}
}
}
}
private
byte
GetTypeBLockHide
(
Entity
entity
)
{
return
entityManager
.
GetComponentData
<
InverseBlockInstance
>(
entity
).
BlockType
;
}
private
void
ShowBlock
(
Vector3
position
,
byte
type
)
{
...
...
@@ -239,9 +239,7 @@ public class PointAndClickUX : MonoBehaviour
private
void
HideBlock
(
Vector3
position
)
{
if
(
grid
==
null
||
rayCastSystem
.
currentEntity
==
Entity
.
Null
)
return
;
ShowBlock
(
position
,
20
);
// grid.RemoveBlock(position,rayCastSystem.currentEntity);
ShowBlock
(
position
,
255
);
}
private
void
RemoveBlock
(
Vector3
position
)
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help