Compare commits
150 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| f0be78888f | |||
| 892e77e0ff | |||
| 8a9c21f979 | |||
| aa46d49620 | |||
| 5d92e12eff | |||
| e1a3ae6b9c | |||
| d44ead55db | |||
| a3fb10570e | |||
| 57154a6fb8 | |||
| 5db1f450af | |||
| 62875c0a27 | |||
| b3c6b59721 | |||
| d9f7895b3f | |||
| dc58f6b0b0 | |||
| 556a7eaddf | |||
| 39a79be700 | |||
| 73ef71f4fd | |||
| 6a07ecfd5b | |||
| e512df9c82 | |||
| 59221e89ba | |||
| 32533ddb21 | |||
| fc537e137f | |||
| 2aaaf6572c | |||
| a89e4cdfe7 | |||
| 9a89255ae8 | |||
| 9f3145eb19 | |||
| 5dde0dae60 | |||
| 0794c53b24 | |||
| 2973087beb | |||
| db2b831278 | |||
| 23145f45e1 | |||
| d1a0a66639 | |||
| 00f57f1bdd | |||
| 55c26f4bdd | |||
| 69c5c62a45 | |||
| cf7362b023 | |||
| 6a802df7ee | |||
| c6de60f18c | |||
| 9f2744df2c | |||
| 8d2fc0072d | |||
| 698513da48 | |||
| f92722d3ed | |||
| 065d4c0fd5 | |||
| 70eae64ea4 | |||
| a0a7d4f956 | |||
| 48506f89cc | |||
| f4aba6c1e5 | |||
| 9810084094 | |||
| 8bc9279621 | |||
| 09411919ab | |||
| 3a632c1117 | |||
| c1a1e576b6 | |||
| df7adc859c | |||
| 7cf05003dd | |||
| 2822a6b8c3 | |||
| 38b73d48f8 | |||
| abe721a323 | |||
| 837794f6e9 | |||
| d8d46be6b3 | |||
| 57c5307c8c | |||
| e0e0c42a14 | |||
| 6e6e53a3b1 | |||
| de1e154065 | |||
| 74a75538f9 | |||
| 8aaec04705 | |||
| 2c910136c6 | |||
| 8f64e7fcb3 | |||
| e674b4970a | |||
| fc5e4828b8 | |||
| f3bb67fda1 | |||
| 7a915262fc | |||
| 40541bfec6 | |||
| 32db50d03b | |||
| dca1908a1e | |||
| dab592bb0a | |||
| 672865ed87 | |||
| 10f0c244ff | |||
| 26f611380c | |||
| cd42a3b5dd | |||
| a9c39f7bb3 | |||
| 815bebf7a0 | |||
| fe4b6fc163 | |||
| 9a22673e47 | |||
| ef0ba750d9 | |||
| 561ad1029e | |||
| 8412d2e425 | |||
| 899fe0edc1 | |||
| a60763e02d | |||
| 764fd1e45a | |||
| 17d81ef20f | |||
| 6024556001 | |||
| 6437c3b20b | |||
| 5401886b04 | |||
| 8b44834934 | |||
| 11a154a98e | |||
| 59ec7af536 | |||
| 451471a6bc | |||
| 3de01bdf4e | |||
| 37c128cf1c | |||
| 781e35c76f | |||
| 7ad76b5c6c | |||
| ecb7af44b3 | |||
| b8cb1ca97a | |||
| 2e73558cde | |||
| 3f9bc06dfb | |||
| 19da51c40b | |||
| c3de6a49a8 | |||
| 97c017998a | |||
| d949a0f650 | |||
| 46d33dc3f7 | |||
| c0bc7d0805 | |||
| 8d4e390db9 | |||
| 123e87f554 | |||
| 8f3dc3543e | |||
| f8b3511656 | |||
| d8d2d3f574 | |||
| 0e357a9198 | |||
| 67e0efeb18 | |||
| 5a702d00eb | |||
| f13ff5519e | |||
| 73f9ebec65 | |||
| d1a7623cc9 | |||
| 19a7cbff76 | |||
| 37554b9e63 | |||
| aa3ce05498 | |||
| c0ce0d3a97 | |||
| 62e98a3f93 | |||
| 4ae838bdc6 | |||
| f0b2c7f151 | |||
| 52133c15fc | |||
| 4dfd26f730 | |||
| b071f87d48 | |||
| 0ba69b311b | |||
| bb3c7df806 | |||
| 1e0d533fab | |||
| 4ad1387de8 | |||
| b090a881a5 | |||
| 1fd0ea9873 | |||
| ccde4ed9a2 | |||
| 5ae2893733 | |||
| 5922e373eb | |||
| 97125e251f | |||
| bc2c8269ed | |||
| 054fe68fc3 | |||
| d975978800 | |||
| 8a1e781e9e | |||
| fd2f4cf175 | |||
| 0a3304f958 | |||
| 29e74841ef | |||
| 13481e5932 |
+210
@@ -0,0 +1,210 @@
|
||||
root = true
|
||||
# Don't use tabs for indentation.
|
||||
[*]
|
||||
indent_style = space
|
||||
|
||||
# Microsoft .NET properties
|
||||
csharp_using_directive_placement = outside_namespace:silent
|
||||
|
||||
dotnet_style_parentheses_in_arithmetic_binary_operators = never_if_unnecessary:none
|
||||
dotnet_style_parentheses_in_other_binary_operators = never_if_unnecessary:none
|
||||
dotnet_style_parentheses_in_relational_binary_operators = never_if_unnecessary:none
|
||||
|
||||
# ReSharper properties
|
||||
resharper_align_linq_query = false
|
||||
resharper_align_multiline_calls_chain = true
|
||||
resharper_align_multiline_extends_list = true
|
||||
resharper_align_multiline_for_stmt = true
|
||||
resharper_align_multiline_parameter = true
|
||||
resharper_align_multiple_declaration = true
|
||||
resharper_align_multline_type_parameter_constrains = true
|
||||
resharper_align_multline_type_parameter_list = true
|
||||
resharper_braces_for_dowhile = not_required
|
||||
resharper_braces_for_fixed = not_required
|
||||
resharper_braces_for_lock = not_required
|
||||
resharper_braces_for_using = not_required
|
||||
resharper_csharp_align_multiline_calls_chain = false
|
||||
resharper_csharp_align_multiline_extends_list = false
|
||||
resharper_csharp_align_multiline_parameter = false
|
||||
resharper_csharp_int_align_comments = false
|
||||
resharper_csharp_outdent_commas = true
|
||||
resharper_csharp_outdent_dots = false
|
||||
resharper_csharp_wrap_after_declaration_lpar = true
|
||||
resharper_csharp_wrap_after_invocation_lpar = true
|
||||
resharper_csharp_wrap_arguments_style = chop_if_long
|
||||
resharper_csharp_wrap_before_declaration_rpar = true
|
||||
resharper_csharp_wrap_before_invocation_rpar = false
|
||||
resharper_csharp_wrap_extends_list_style = chop_if_long
|
||||
resharper_csharp_wrap_parameters_style = chop_if_long
|
||||
resharper_force_attribute_style = join
|
||||
resharper_indent_nested_fixed_stmt = false
|
||||
resharper_indent_nested_foreach_stmt = true
|
||||
resharper_indent_nested_for_stmt = true
|
||||
resharper_indent_nested_lock_stmt = false
|
||||
resharper_indent_nested_usings_stmt = false
|
||||
resharper_indent_nested_while_stmt = true
|
||||
resharper_int_align = false
|
||||
resharper_int_align_nested_ternary = false
|
||||
resharper_int_align_switch_expressions = false
|
||||
resharper_keep_existing_declaration_block_arrangement = true
|
||||
resharper_keep_existing_declaration_parens_arrangement = false
|
||||
resharper_keep_existing_embedded_block_arrangement = true
|
||||
resharper_keep_existing_enum_arrangement = true
|
||||
resharper_keep_existing_expr_member_arrangement = true
|
||||
resharper_keep_existing_initializer_arrangement = false
|
||||
resharper_local_function_body = expression_body
|
||||
resharper_max_attribute_length_for_same_line = 20
|
||||
resharper_max_formal_parameters_on_line = 5
|
||||
resharper_max_initializer_elements_on_line = 0
|
||||
resharper_max_invocation_arguments_on_line = 5
|
||||
resharper_outdent_binary_ops = true
|
||||
resharper_outdent_dots = false
|
||||
resharper_place_constructor_initializer_on_same_line = false
|
||||
resharper_place_simple_initializer_on_single_line = true
|
||||
resharper_prefer_explicit_discard_declaration = false
|
||||
resharper_wrap_after_declaration_lpar = false
|
||||
resharper_wrap_before_invocation_rpar = false
|
||||
resharper_wrap_chained_binary_expressions = chop_if_long
|
||||
resharper_wrap_chained_binary_patterns = chop_if_long
|
||||
resharper_wrap_chained_method_calls = chop_if_long
|
||||
resharper_xmldoc_indent_text = ZeroIndent
|
||||
|
||||
# Standard properties
|
||||
insert_final_newline = true
|
||||
|
||||
# (Please don't specify an indent_size here; that has too many unintended consequences.)
|
||||
|
||||
# Code files
|
||||
[*.{cs,csx,vb,vbx}]
|
||||
indent_size = 4
|
||||
charset = utf-8
|
||||
|
||||
# Xml project files
|
||||
[*.{csproj,vbproj,vcxproj,vcxproj.filters,proj,projitems,shproj}]
|
||||
indent_size = 2
|
||||
space_after_last_pi_attribute = false
|
||||
# Xml config files
|
||||
[*.{props,targets,ruleset,config,nuspec,resx,vsixmanifest,vsct}]
|
||||
indent_size = 2
|
||||
space_after_last_pi_attribute = false
|
||||
|
||||
# JSON files
|
||||
[*.json]
|
||||
indent_size = 2
|
||||
|
||||
# Dotnet code style settings:
|
||||
[*.{cs,vb}]
|
||||
# Sort using and Import directives with System.* appearing first
|
||||
dotnet_sort_system_directives_first = true
|
||||
dotnet_separate_import_directive_groups = false
|
||||
|
||||
# Avoid "this." and "Me." if not necessary
|
||||
dotnet_style_qualification_for_field = false:suggestion
|
||||
dotnet_style_qualification_for_property = false:suggestion
|
||||
dotnet_style_qualification_for_method = false:suggestion
|
||||
dotnet_style_qualification_for_event = false:suggestion
|
||||
|
||||
# Use language keywords instead of framework type names for type references
|
||||
dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion
|
||||
dotnet_style_predefined_type_for_member_access = true:suggestion
|
||||
|
||||
# Parentheses preferences
|
||||
dotnet_style_parentheses_in_arithmetic_binary_operators = never_if_unnecessary:silent
|
||||
dotnet_style_parentheses_in_relational_binary_operators = never_if_unnecessary:silent
|
||||
dotnet_style_parentheses_in_other_binary_operators = never_if_unnecessary:silent
|
||||
dotnet_style_parentheses_in_other_operators = never_if_unnecessary:silent
|
||||
|
||||
# Modifier preferences
|
||||
dotnet_style_require_accessibility_modifiers = for_non_interface_members:silent
|
||||
dotnet_style_readonly_field = true:suggestion
|
||||
|
||||
# Expression-level preferences
|
||||
dotnet_style_object_initializer = true:suggestion
|
||||
dotnet_style_collection_initializer = true:suggestion
|
||||
dotnet_style_coalesce_expression = true:suggestion
|
||||
dotnet_style_null_propagation = true:suggestion
|
||||
dotnet_style_explicit_tuple_names = true:suggestion
|
||||
dotnet_style_prefer_is_null_check_over_reference_equality_method = true:silent
|
||||
dotnet_style_prefer_inferred_tuple_names = true:suggestion
|
||||
dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion
|
||||
dotnet_style_prefer_auto_properties = true:warning
|
||||
dotnet_style_prefer_conditional_expression_over_assignment = true:silent
|
||||
dotnet_style_prefer_conditional_expression_over_return = true:silent
|
||||
|
||||
|
||||
# CSharp code style settings:
|
||||
[*.cs]
|
||||
# Prefer "var" everywhere
|
||||
csharp_style_var_elsewhere = false:none
|
||||
csharp_style_var_for_built_in_types = false:none
|
||||
csharp_style_var_when_type_is_apparent = false:none
|
||||
|
||||
# Prefer method-like constructs to have a block body
|
||||
csharp_style_expression_bodied_methods = false:suggestion
|
||||
csharp_style_expression_bodied_constructors = false:suggestion
|
||||
csharp_style_expression_bodied_operators = true:suggestion
|
||||
|
||||
# Prefer property-like constructs to have an expression-body
|
||||
csharp_style_expression_bodied_properties = true:suggestion
|
||||
csharp_style_expression_bodied_indexers = true:suggestion
|
||||
csharp_style_expression_bodied_accessors = true:suggestion
|
||||
|
||||
# Suggest more modern language features when available
|
||||
csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion
|
||||
csharp_style_pattern_matching_over_as_with_null_check = true:suggestion
|
||||
csharp_style_inlined_variable_declaration = true:suggestion
|
||||
csharp_style_throw_expression = true:suggestion
|
||||
csharp_style_conditional_delegate_call = true:suggestion
|
||||
|
||||
# Newline settings
|
||||
csharp_new_line_before_open_brace = all
|
||||
csharp_new_line_before_else = true
|
||||
csharp_new_line_before_catch = true
|
||||
csharp_new_line_before_finally = true
|
||||
csharp_new_line_before_members_in_object_initializers = true
|
||||
csharp_new_line_before_members_in_anonymous_types = true
|
||||
|
||||
# Space preferences
|
||||
csharp_space_after_cast = false
|
||||
csharp_space_after_keywords_in_control_flow_statements = true
|
||||
csharp_space_between_method_call_parameter_list_parentheses = false
|
||||
csharp_space_between_method_declaration_parameter_list_parentheses = false
|
||||
csharp_space_between_parentheses = false
|
||||
csharp_space_before_colon_in_inheritance_clause = true
|
||||
csharp_space_after_colon_in_inheritance_clause = true
|
||||
csharp_space_around_binary_operators = before_and_after
|
||||
csharp_space_between_method_declaration_empty_parameter_list_parentheses = false
|
||||
csharp_space_between_method_call_name_and_opening_parenthesis = false
|
||||
csharp_space_between_method_call_empty_parameter_list_parentheses = false
|
||||
|
||||
# Wrapping preferences
|
||||
csharp_preserve_single_line_statements = true
|
||||
csharp_preserve_single_line_blocks = true
|
||||
|
||||
# Analyzer settings
|
||||
dotnet_diagnostic.ide0055.severity = none
|
||||
|
||||
# Maintainability rules
|
||||
dotnet_diagnostic.ca1501.severity = warning
|
||||
dotnet_diagnostic.ca1502.severity = warning
|
||||
dotnet_diagnostic.ca1505.severity = warning
|
||||
dotnet_diagnostic.ca1506.severity = warning
|
||||
dotnet_diagnostic.ca1507.severity = warning
|
||||
dotnet_diagnostic.ca1508.severity = warning
|
||||
dotnet_diagnostic.ca1509.severity = warning
|
||||
|
||||
# Misc
|
||||
dotnet_diagnostic.ca1051.severity = none # Do not declare visible instance fields
|
||||
dotnet_diagnostic.ca1062.severity = none # Public method must check all parameters for null
|
||||
dotnet_diagnostic.ca1707.severity = none # Remove underscores in names
|
||||
|
||||
|
||||
dotnet_analyzer_diagnostic.category-globalization.severity = none
|
||||
dotnet_analyzer_diagnostic.category-security.severity = none
|
||||
dotnet_analyzer_diagnostic.category-interoperability.severity = none
|
||||
dotnet_analyzer_diagnostic.category-singlefile.severity = none
|
||||
|
||||
[*.{appxmanifest,asax,ascx,aspx,axaml,build,c,c++,cc,cginc,compute,cp,cpp,cs,cshtml,cu,cuh,cxx,dtd,fs,fsi,fsscript,fsx,fx,fxh,h,hh,hlsl,hlsli,hlslinc,hpp,hxx,inc,inl,ino,ipp,ixx,master,ml,mli,mpp,mq4,mq5,mqh,nuspec,paml,razor,resw,resx,shader,skin,tpp,usf,ush,vb,xaml,xamlx,xoml,xsd}]
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
tab_width = 2
|
||||
+9
-5
@@ -10,6 +10,9 @@
|
||||
/[Ll]ogs/
|
||||
/[Uu]ser[Ss]ettings/
|
||||
|
||||
#Test space content
|
||||
/[Tt]estSpace/
|
||||
|
||||
# MemoryCaptures can get excessive in size.
|
||||
# They also could contain extremely sensitive data
|
||||
/[Mm]emoryCaptures/
|
||||
@@ -42,14 +45,14 @@ ExportedObj/
|
||||
*.pidb
|
||||
*.booproj
|
||||
*.svd
|
||||
*.pdb
|
||||
#*.pdb
|
||||
*.mdb
|
||||
*.opendb
|
||||
*.VC.db
|
||||
|
||||
# Unity3D generated meta files
|
||||
*.pidb.meta
|
||||
*.pdb.meta
|
||||
#*.pdb.meta
|
||||
*.mdb.meta
|
||||
|
||||
# Unity3D generated file on crash reports
|
||||
@@ -70,7 +73,8 @@ crashlytics-build.properties
|
||||
/[Aa]ssets/[Ss]treamingAssets/aa.meta
|
||||
/[Aa]ssets/[Ss]treamingAssets/aa/*
|
||||
.idea/
|
||||
*.meta
|
||||
|
||||
# Unity Plugins
|
||||
/[Aa]ssets/[Pp]lugins/
|
||||
# Speckle cached recieved objects
|
||||
/[Aa]ssets/[Rr]esources/[Mm]aterials/
|
||||
/[Aa]ssets/[Rr]esources/[Gg]eometry/
|
||||
/[Aa]ssets/[Rr]esources/[Pp]refabs/
|
||||
-52
@@ -1,52 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ContentModelStore">
|
||||
<e p="C:\Code\Speckle-Next\speckle-unity\Speckle Unity" t="IncludeRecursive">
|
||||
<e p="Assembly-CSharp.csproj" t="IncludeRecursive" />
|
||||
<e p="Assets" t="Include">
|
||||
<e p="Extra" t="Include">
|
||||
<e p="CameraOperate.cs" t="Include" />
|
||||
<e p="RosolynDirectoryCreator.cs" t="Include" />
|
||||
<e p="Selectable.cs" t="Include" />
|
||||
<e p="SelectionManager.cs" t="Include" />
|
||||
</e>
|
||||
<e p="First person controller" t="Include">
|
||||
<e p="Scripts" t="Include">
|
||||
<e p="Components" t="Include">
|
||||
<e p="Crouch.cs" t="Include" />
|
||||
<e p="FirstPersonAudio.cs" t="Include" />
|
||||
<e p="GroundCheck.cs" t="Include" />
|
||||
<e p="Jump.cs" t="Include" />
|
||||
<e p="Zoom.cs" t="Include" />
|
||||
</e>
|
||||
<e p="FirstPersonLook.cs" t="Include" />
|
||||
<e p="FirstPersonMovement.cs" t="Include" />
|
||||
</e>
|
||||
</e>
|
||||
<e p="InteractionLogic.cs" t="Include" />
|
||||
<e p="Speckle Connector" t="Include">
|
||||
<e p="ConverterUnity.BuiltElements.cs" t="Include" />
|
||||
<e p="ConverterUnity.cs" t="Include" />
|
||||
<e p="ConverterUnity.Geometry.cs" t="Include" />
|
||||
<e p="ConverterUnity.Units.cs" t="Include" />
|
||||
<e p="Dispatcher.cs" t="Include" />
|
||||
<e p="Receiver.cs" t="Include" />
|
||||
<e p="Sender.cs" t="Include" />
|
||||
<e p="SpeckleProperties.cs" t="Include" />
|
||||
<e p="Streams.cs" t="Include" />
|
||||
<e p="Utils.cs" t="Include" />
|
||||
</e>
|
||||
<e p="SpeckleExamples.cs" t="Include" />
|
||||
<e p="Tutorial" t="Include">
|
||||
<e p="Tutorial.cs" t="Include" />
|
||||
</e>
|
||||
</e>
|
||||
<e p="obj" t="ExcludeRecursive" />
|
||||
<e p="Packages" t="ExcludeRecursive" />
|
||||
<e p="Speckle Unity.sln" t="IncludeFlat" />
|
||||
<e p="Temp\Bin" t="ExcludeRecursive" />
|
||||
</e>
|
||||
<e p="C:\Users\Admin\AppData\Local\JetBrains\Rider2020.2\extResources" t="IncludeRecursive" />
|
||||
<e p="C:\Users\Admin\AppData\Local\JetBrains\Rider2020.2\resharper-host\Local\Transient\Rider\v202\SolutionCaches\_Speckle Unity.-1593363948.00" t="ExcludeRecursive" />
|
||||
</component>
|
||||
</project>
|
||||
-8
@@ -1,8 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/.idea.Speckle Unity/riderModule.iml" filepath="$PROJECT_DIR$/.idea/.idea.Speckle Unity/riderModule.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
||||
-7
@@ -1,7 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="RIDER_MODULE" version="4">
|
||||
<component name="NewModuleRootManager">
|
||||
<content url="file://$MODULE_DIR$/../.." />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"version": "1.0",
|
||||
"components": [
|
||||
"Microsoft.VisualStudio.Workload.ManagedGame"
|
||||
]
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: addaa5ebcd10c5245bf8d074437d5b37
|
||||
guid: f7f8762fcd0c1174782d2ba683cb6b74
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
+172
-172
@@ -22,193 +22,193 @@ using UnityEngine;
|
||||
|
||||
public class CameraOperate : MonoBehaviour
|
||||
{
|
||||
[Tooltip("Mouse wheel rolling control lens please enter, the speed of the back")]
|
||||
[Range(0.5f, 10f)] public float scrollSpeed = 10f;
|
||||
[Tooltip("Right mouse button control lens X axis rotation speed")]
|
||||
[Range(0.5f, 2f)] public float rotateXSpeed = 1f;
|
||||
[Tooltip("Right mouse button control lens Y axis rotation speed")]
|
||||
[Range(0.5f, 2f)] public float rotateYSpeed = 1f;
|
||||
[Tooltip("Mouse wheel press, lens translation speed")]
|
||||
[Range(0.5f, 2f)] public float moveSpeed = 1f;
|
||||
[Tooltip("The keyboard controls how fast the camera moves")]
|
||||
[Range(0.5f, 2f)] public float keyMoveSpeed = 1f;
|
||||
[Tooltip("Mouse wheel rolling control lens please enter, the speed of the back")]
|
||||
[Range(0f, 10f)] public float scrollSpeed = 10f;
|
||||
[Tooltip("Right mouse button control lens X axis rotation speed")]
|
||||
[Range(0.5f, 2f)] public float rotateXSpeed = 1f;
|
||||
[Tooltip("Right mouse button control lens Y axis rotation speed")]
|
||||
[Range(0.5f, 2f)] public float rotateYSpeed = 1f;
|
||||
[Tooltip("Mouse wheel press, lens translation speed")]
|
||||
[Range(0.5f, 2f)] public float moveSpeed = 1f;
|
||||
[Tooltip("The keyboard controls how fast the camera moves")]
|
||||
[Range(0.5f, 2f)] public float keyMoveSpeed = 1f;
|
||||
|
||||
//Whether the lens control operation is performed
|
||||
//是否进行镜头控制操作
|
||||
public bool operate = true;
|
||||
//Whether the lens control operation is performed
|
||||
//是否进行镜头控制操作
|
||||
public bool operate = true;
|
||||
|
||||
//Whether keyboard control lens operation is performed
|
||||
//是否进行键盘控制镜头操作
|
||||
public bool isKeyOperate = true;
|
||||
//Whether keyboard control lens operation is performed
|
||||
//是否进行键盘控制镜头操作
|
||||
public bool isKeyOperate = true;
|
||||
|
||||
//Whether currently in rotation
|
||||
//目前是否在轮换
|
||||
private bool isRotate = false;
|
||||
//Whether currently in rotation
|
||||
//目前是否在轮换
|
||||
private bool isRotate = false;
|
||||
|
||||
//Is currently in panning
|
||||
//目前在平移吗
|
||||
private bool isMove = false;
|
||||
//Is currently in panning
|
||||
//目前在平移吗
|
||||
private bool isMove = false;
|
||||
|
||||
//Camera transform component cache
|
||||
//摄像机转换组件缓存
|
||||
private Transform m_transform;
|
||||
//Camera transform component cache
|
||||
//摄像机转换组件缓存
|
||||
private Transform m_transform;
|
||||
|
||||
//The initial position of the camera at the beginning of the operation
|
||||
//摄像机在开始进行操作时摄像机初始的位置
|
||||
private Vector3 traStart;
|
||||
//The initial position of the camera at the beginning of the operation
|
||||
//摄像机在开始进行操作时摄像机初始的位置
|
||||
private Vector3 traStart;
|
||||
|
||||
//The initial position of the mouse as the camera begins to operate
|
||||
//摄像机在开始进行操作时鼠标初始的位置
|
||||
private Vector3 mouseStart;
|
||||
//The initial position of the mouse as the camera begins to operate
|
||||
//摄像机在开始进行操作时鼠标初始的位置
|
||||
private Vector3 mouseStart;
|
||||
|
||||
//Is the camera facing down
|
||||
//摄像机是否镜头朝下
|
||||
private bool isDown = false;
|
||||
//Is the camera facing down
|
||||
//摄像机是否镜头朝下
|
||||
private bool isDown = false;
|
||||
|
||||
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
{
|
||||
m_transform = transform;
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
if (operate)
|
||||
{
|
||||
m_transform = transform;
|
||||
}
|
||||
//When in the rotation state, and the right mouse button is released, then exit the rotation state
|
||||
//当处于旋转状态,且鼠标右键放开,则退出旋转状态
|
||||
if (isRotate && Input.GetMouseButtonUp(1))
|
||||
{
|
||||
isRotate = false;
|
||||
}
|
||||
//When it is in the translation state, and the mouse wheel is released, it will exit the translation state
|
||||
//当处于平移状态,且鼠标滚轮放开,则退出平移状态
|
||||
if (isMove && Input.GetMouseButtonUp(2))
|
||||
{
|
||||
isMove = false;
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
if (operate)
|
||||
//Whether it's in a rotational state
|
||||
//是否处于旋转状态
|
||||
if (isRotate)
|
||||
{
|
||||
//Gets the offset of the mouse on the screen
|
||||
//获取鼠标在屏幕上的偏移量
|
||||
Vector3 offset = Input.mousePosition - mouseStart;
|
||||
|
||||
// whether the lens is facing down
|
||||
//是否镜头朝下
|
||||
if (isDown)
|
||||
{
|
||||
//When in the rotation state, and the right mouse button is released, then exit the rotation state
|
||||
//当处于旋转状态,且鼠标右键放开,则退出旋转状态
|
||||
if (isRotate && Input.GetMouseButtonUp(1))
|
||||
{
|
||||
isRotate = false;
|
||||
}
|
||||
//When it is in the translation state, and the mouse wheel is released, it will exit the translation state
|
||||
//当处于平移状态,且鼠标滚轮放开,则退出平移状态
|
||||
if (isMove && Input.GetMouseButtonUp(2))
|
||||
{
|
||||
isMove = false;
|
||||
}
|
||||
|
||||
//Whether it's in a rotational state
|
||||
//是否处于旋转状态
|
||||
if (isRotate)
|
||||
{
|
||||
//Gets the offset of the mouse on the screen
|
||||
//获取鼠标在屏幕上的偏移量
|
||||
Vector3 offset = Input.mousePosition - mouseStart;
|
||||
|
||||
// whether the lens is facing down
|
||||
//是否镜头朝下
|
||||
if (isDown)
|
||||
{
|
||||
// the final rotation Angle = initial Angle + offset, 0.3f coefficient makes the rotation speed normal when rotateYSpeed, rotateXSpeed is 1
|
||||
//最后的旋转角度 = 初始角度 + 偏移量,0.3f系数使得当rotateYSpeed,rotateXSpeed为1的时候,旋转速度正常
|
||||
m_transform.rotation = Quaternion.Euler(traStart + new Vector3(offset.y * 0.3f * rotateYSpeed, -offset.x * 0.3f * rotateXSpeed, 0));
|
||||
}
|
||||
else
|
||||
{
|
||||
// final rotation Angle = initial Angle + offset
|
||||
//最后的旋转角度 = 初始角度 + 偏移量
|
||||
m_transform.rotation = Quaternion.Euler(traStart + new Vector3(-offset.y * 0.3f * rotateYSpeed, offset.x * 0.3f * rotateXSpeed, 0));
|
||||
}
|
||||
|
||||
// simulate the unity editor operation: right click, the keyboard can control the lens movement
|
||||
//模仿unity编辑器操作:右键按下,键盘可以控制镜头移动
|
||||
if (isKeyOperate)
|
||||
{
|
||||
float speed = keyMoveSpeed;
|
||||
// press LeftShift to make speed *2
|
||||
//按下LeftShift使得速度*2
|
||||
if (Input.GetKey(KeyCode.LeftShift))
|
||||
{
|
||||
speed = 2f * speed;
|
||||
}
|
||||
// press W on the keyboard to move the camera forward
|
||||
//键盘W键按下,镜头前进
|
||||
if (Input.GetKey(KeyCode.W))
|
||||
{
|
||||
m_transform.position += m_transform.forward * Time.deltaTime * 10f * speed;
|
||||
}
|
||||
// press the S key on the keyboard to back up the camera
|
||||
//键盘S键按下,镜头后退
|
||||
if (Input.GetKey(KeyCode.S))
|
||||
{
|
||||
m_transform.position -= m_transform.forward * Time.deltaTime * 10f * speed;
|
||||
}
|
||||
// press A on the keyboard and the camera will turn left
|
||||
//键盘A键按下,镜头向左
|
||||
if (Input.GetKey(KeyCode.A))
|
||||
{
|
||||
m_transform.position -= m_transform.right * Time.deltaTime * 10f * speed;
|
||||
}
|
||||
// press D on the keyboard to turn the camera to the right
|
||||
//键盘D键按下,镜头向右
|
||||
if (Input.GetKey(KeyCode.D))
|
||||
{
|
||||
m_transform.position += m_transform.right * Time.deltaTime * 10f * speed;
|
||||
}
|
||||
}
|
||||
}
|
||||
// press the right mouse button to enter the rotation state
|
||||
//鼠标右键按下,表示进入旋转状态
|
||||
else if (Input.GetMouseButtonDown(1))
|
||||
{
|
||||
// enter the rotation state
|
||||
//进入旋转状态
|
||||
isRotate = true;
|
||||
// record the initial position of the mouse in order to calculate the offset
|
||||
//记录鼠标初始位置,为了计算偏移量
|
||||
mouseStart = Input.mousePosition;
|
||||
// record the initial mouse Angle
|
||||
//记录鼠标初始角度
|
||||
traStart = m_transform.rotation.eulerAngles;
|
||||
// to determine whether the lens is facing down (the Y-axis is <0 according to the position of the object facing up),-0.0001f is a special case when x rotates 90
|
||||
//判断镜头是否朝下(根据物体朝上的位置的y轴是<0),-0.0001f是x旋转90的时候的特例
|
||||
isDown = m_transform.up.y < -0.0001f ? true : false;
|
||||
}
|
||||
|
||||
// whether it is in the translation state
|
||||
//是否处于平移状态
|
||||
if (isMove)
|
||||
{
|
||||
// mouse offset on the screen
|
||||
//鼠标在屏幕上的偏移量
|
||||
Vector3 offset = Input.mousePosition - mouseStart;
|
||||
// final position = initial position + offset
|
||||
//最终位置 = 初始位置 + 偏移量
|
||||
m_transform.position = traStart + m_transform.up * -offset.y * 0.1f * moveSpeed + m_transform.right * -offset.x * 0.1f * moveSpeed;
|
||||
}
|
||||
// click the mouse wheel to enter translation mode
|
||||
//鼠标滚轮按下,进入平移模式
|
||||
else if (Input.GetMouseButtonDown(2))
|
||||
{
|
||||
// translation begins
|
||||
//平移开始
|
||||
isMove = true;
|
||||
// record the initial position of the mouse
|
||||
//记录鼠标初始位置
|
||||
mouseStart = Input.mousePosition;
|
||||
// record the initial position of the camera
|
||||
//记录摄像机初始位置
|
||||
traStart = m_transform.position;
|
||||
}
|
||||
|
||||
// how much did the roller roll
|
||||
//滚轮滚动了多少
|
||||
float scroll = Input.GetAxis("Mouse ScrollWheel");
|
||||
// scroll to scroll or not
|
||||
//滚动是否滚动
|
||||
if (scroll != 0)
|
||||
{
|
||||
// position = current position + scroll amount
|
||||
//位置 = 当前位置 + 滚动量
|
||||
m_transform.position += m_transform.forward * scroll * 1000f * Time.deltaTime * scrollSpeed;
|
||||
}
|
||||
|
||||
|
||||
// the final rotation Angle = initial Angle + offset, 0.3f coefficient makes the rotation speed normal when rotateYSpeed, rotateXSpeed is 1
|
||||
//最后的旋转角度 = 初始角度 + 偏移量,0.3f系数使得当rotateYSpeed,rotateXSpeed为1的时候,旋转速度正常
|
||||
m_transform.rotation = Quaternion.Euler(traStart + new Vector3(offset.y * 0.3f * rotateYSpeed, -offset.x * 0.3f * rotateXSpeed, 0));
|
||||
}
|
||||
else
|
||||
{
|
||||
// final rotation Angle = initial Angle + offset
|
||||
//最后的旋转角度 = 初始角度 + 偏移量
|
||||
m_transform.rotation = Quaternion.Euler(traStart + new Vector3(-offset.y * 0.3f * rotateYSpeed, offset.x * 0.3f * rotateXSpeed, 0));
|
||||
}
|
||||
|
||||
// simulate the unity editor operation: right click, the keyboard can control the lens movement
|
||||
//模仿unity编辑器操作:右键按下,键盘可以控制镜头移动
|
||||
if (isKeyOperate)
|
||||
{
|
||||
float speed = keyMoveSpeed;
|
||||
// press LeftShift to make speed *2
|
||||
//按下LeftShift使得速度*2
|
||||
if (Input.GetKey(KeyCode.LeftShift))
|
||||
{
|
||||
speed = 2f * speed;
|
||||
}
|
||||
// press W on the keyboard to move the camera forward
|
||||
//键盘W键按下,镜头前进
|
||||
if (Input.GetKey(KeyCode.W))
|
||||
{
|
||||
m_transform.position += m_transform.forward * Time.deltaTime * 10f * speed;
|
||||
}
|
||||
// press the S key on the keyboard to back up the camera
|
||||
//键盘S键按下,镜头后退
|
||||
if (Input.GetKey(KeyCode.S))
|
||||
{
|
||||
m_transform.position -= m_transform.forward * Time.deltaTime * 10f * speed;
|
||||
}
|
||||
// press A on the keyboard and the camera will turn left
|
||||
//键盘A键按下,镜头向左
|
||||
if (Input.GetKey(KeyCode.A))
|
||||
{
|
||||
m_transform.position -= m_transform.right * Time.deltaTime * 10f * speed;
|
||||
}
|
||||
// press D on the keyboard to turn the camera to the right
|
||||
//键盘D键按下,镜头向右
|
||||
if (Input.GetKey(KeyCode.D))
|
||||
{
|
||||
m_transform.position += m_transform.right * Time.deltaTime * 10f * speed;
|
||||
}
|
||||
}
|
||||
}
|
||||
// press the right mouse button to enter the rotation state
|
||||
//鼠标右键按下,表示进入旋转状态
|
||||
else if (Input.GetMouseButtonDown(1))
|
||||
{
|
||||
// enter the rotation state
|
||||
//进入旋转状态
|
||||
isRotate = true;
|
||||
// record the initial position of the mouse in order to calculate the offset
|
||||
//记录鼠标初始位置,为了计算偏移量
|
||||
mouseStart = Input.mousePosition;
|
||||
// record the initial mouse Angle
|
||||
//记录鼠标初始角度
|
||||
traStart = m_transform.rotation.eulerAngles;
|
||||
// to determine whether the lens is facing down (the Y-axis is <0 according to the position of the object facing up),-0.0001f is a special case when x rotates 90
|
||||
//判断镜头是否朝下(根据物体朝上的位置的y轴是<0),-0.0001f是x旋转90的时候的特例
|
||||
isDown = m_transform.up.y < -0.0001f ? true : false;
|
||||
}
|
||||
|
||||
// whether it is in the translation state
|
||||
//是否处于平移状态
|
||||
if (isMove)
|
||||
{
|
||||
// mouse offset on the screen
|
||||
//鼠标在屏幕上的偏移量
|
||||
Vector3 offset = Input.mousePosition - mouseStart;
|
||||
// final position = initial position + offset
|
||||
//最终位置 = 初始位置 + 偏移量
|
||||
m_transform.position = traStart + m_transform.up * -offset.y * 0.1f * moveSpeed + m_transform.right * -offset.x * 0.1f * moveSpeed;
|
||||
}
|
||||
// click the mouse wheel to enter translation mode
|
||||
//鼠标滚轮按下,进入平移模式
|
||||
else if (Input.GetMouseButtonDown(2))
|
||||
{
|
||||
// translation begins
|
||||
//平移开始
|
||||
isMove = true;
|
||||
// record the initial position of the mouse
|
||||
//记录鼠标初始位置
|
||||
mouseStart = Input.mousePosition;
|
||||
// record the initial position of the camera
|
||||
//记录摄像机初始位置
|
||||
traStart = m_transform.position;
|
||||
}
|
||||
|
||||
// how much did the roller roll
|
||||
//滚轮滚动了多少
|
||||
float scroll = Input.GetAxis("Mouse ScrollWheel");
|
||||
// scroll to scroll or not
|
||||
//滚动是否滚动
|
||||
if (scroll != 0)
|
||||
{
|
||||
// position = current position + scroll amount
|
||||
//位置 = 当前位置 + 滚动量
|
||||
m_transform.position += m_transform.forward * scroll * 1000f * Time.deltaTime * scrollSpeed;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6c972b8c7391a8243869747abd85964f
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,71 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Threading.Tasks;
|
||||
using Speckle.ConnectorUnity;
|
||||
using Speckle.ConnectorUnity.Components;
|
||||
using Speckle.Core.Api;
|
||||
using Speckle.Core.Credentials;
|
||||
using Speckle.Core.Transports;
|
||||
using UnityEngine;
|
||||
|
||||
[AddComponentMenu("Speckle/Extras/Manual Receiver")]
|
||||
[RequireComponent(typeof(RecursiveConverter))]
|
||||
public class ManualReceive : MonoBehaviour
|
||||
{
|
||||
|
||||
public string authToken;
|
||||
public string serverUrl;
|
||||
public string streamId, objectId;
|
||||
|
||||
private RecursiveConverter receiver;
|
||||
|
||||
|
||||
void Awake()
|
||||
{
|
||||
receiver = GetComponent<RecursiveConverter>();
|
||||
}
|
||||
|
||||
|
||||
IEnumerator Start()
|
||||
{
|
||||
Debug.developerConsoleVisible = true;
|
||||
if(Time.timeSinceLevelLoad > 20) yield return null;
|
||||
Receive();
|
||||
}
|
||||
|
||||
[ContextMenu(nameof(Receive))]
|
||||
public void Receive()
|
||||
{
|
||||
var account = new Account()
|
||||
{
|
||||
token = authToken,
|
||||
serverInfo = new ServerInfo() {url = serverUrl},
|
||||
};
|
||||
|
||||
Task.Run(async () =>
|
||||
{
|
||||
var transport = new ServerTransport(account, streamId);
|
||||
var localTransport = new MemoryTransport();
|
||||
|
||||
var @base = await Operations.Receive(
|
||||
objectId,
|
||||
remoteTransport: transport,
|
||||
localTransport: localTransport,
|
||||
onErrorAction: (m, e) => Debug.LogError(m + e),
|
||||
disposeTransports: true
|
||||
);
|
||||
|
||||
if (@base == null) throw new Exception("received data was null!");
|
||||
|
||||
Dispatcher.Instance().Enqueue(() =>
|
||||
{
|
||||
var parentObject = new GameObject(name);
|
||||
|
||||
receiver.RecursivelyConvertToNative_Sync(@base, parentObject.transform);
|
||||
|
||||
Debug.Log($"Receive {objectId} completed");
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 66c38558aa523bf4290b4fd84411df46
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,79 @@
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Speckle.ConnectorUnity.Components;
|
||||
using Speckle.Core.Api;
|
||||
using Speckle.Core.Models;
|
||||
using Speckle.Core.Transports;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Extra
|
||||
{
|
||||
/// <summary>
|
||||
/// Script used to generate streams for performance benchmarking in other hostApps.
|
||||
/// Will send several several commits with a varying number of copies on a GameObject (with children)
|
||||
/// </summary>
|
||||
[ExecuteAlways]
|
||||
[RequireComponent(typeof(SpeckleSender))]
|
||||
public sealed class PerformanceTestSender : MonoBehaviour
|
||||
{
|
||||
[Range(0, 100)]
|
||||
public int numberOfIterations = 10;
|
||||
|
||||
public Vector3 translation = Vector3.forward * 100;
|
||||
|
||||
public GameObject objectToSend;
|
||||
|
||||
private SpeckleSender sender;
|
||||
private void Awake()
|
||||
{
|
||||
sender = GetComponent<SpeckleSender>();
|
||||
}
|
||||
|
||||
public async Task SendIterations()
|
||||
{
|
||||
GameObject go = new GameObject();
|
||||
for (int i = 0; i < numberOfIterations; i++)
|
||||
{
|
||||
Instantiate(objectToSend, translation * i, Quaternion.identity, go.transform);
|
||||
|
||||
Base b = sender.Converter.RecursivelyConvertToSpeckle(go, _ => true);
|
||||
await Send(b, $"{i}");
|
||||
}
|
||||
Debug.Log("Done!");
|
||||
}
|
||||
|
||||
private async Task<string> Send(Base data, string branchName)
|
||||
{
|
||||
var client = sender.Account.Client;
|
||||
var stream = sender.Stream.Selected;
|
||||
ServerTransport transport = new ServerTransport(sender.Account.Selected, stream!.id);
|
||||
|
||||
await client.BranchCreate(new BranchCreateInput(){streamId = stream.id, name = branchName});
|
||||
|
||||
return await SpeckleSender.SendDataAsync(CancellationToken.None,
|
||||
remoteTransport: transport,
|
||||
data: data,
|
||||
client: client!,
|
||||
branchName: branchName,
|
||||
createCommit: true,
|
||||
onProgressAction: null,
|
||||
onErrorAction: (m, e) => throw e);
|
||||
}
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
[UnityEditor.CustomEditor(typeof(PerformanceTestSender))]
|
||||
public sealed class PerformanceTestSenderEditor : UnityEditor.Editor
|
||||
{
|
||||
public override async void OnInspectorGUI()
|
||||
{
|
||||
DrawDefaultInspector();
|
||||
|
||||
if (GUILayout.Button("Create and send"))
|
||||
{
|
||||
await ((PerformanceTestSender)target).SendIterations();
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c98b93e32c844fb488992e2e376447a1
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,7 +1,8 @@
|
||||
using System.IO;
|
||||
using System.Text.RegularExpressions;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
#if UNITY_EDITOR
|
||||
using UnityEditor;
|
||||
|
||||
namespace Speckle.ConnectorUnity
|
||||
{
|
||||
@@ -21,7 +22,7 @@ namespace Speckle.ConnectorUnity
|
||||
return;
|
||||
|
||||
const string pattern =
|
||||
@"^DirectoryNotFoundException: Could not find a part of the path '.*?\\Temp\\RoslynAnalysisRunner'\.$";
|
||||
@"^DirectoryNotFoundException: Could not find a part of the path '.*?\\Temp\\RoslynAnalysisRunner'\.$";
|
||||
|
||||
if (Regex.IsMatch(message, pattern))
|
||||
{
|
||||
@@ -29,4 +30,5 @@ namespace Speckle.ConnectorUnity
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
+30
-32
@@ -4,45 +4,43 @@ using UnityEngine;
|
||||
|
||||
|
||||
//Thanks to : https://sharpcoderblog.com/blog/unity-3d-rts-style-unit-selection
|
||||
[AddComponentMenu("Speckle/Playground/Selectable"), DisallowMultipleComponent]
|
||||
public class Selectable : MonoBehaviour
|
||||
{
|
||||
|
||||
public Bounds GetObjectBounds()
|
||||
public Bounds GetObjectBounds()
|
||||
{
|
||||
Bounds totalBounds = new Bounds();
|
||||
|
||||
var renderers = this.gameObject.GetComponents<MeshRenderer>();
|
||||
|
||||
foreach (var r in renderers)
|
||||
{
|
||||
Bounds totalBounds = new Bounds();
|
||||
|
||||
var renderers = this.gameObject.GetComponents<MeshRenderer>();
|
||||
|
||||
foreach (var r in renderers)
|
||||
{
|
||||
if(totalBounds.center == Vector3.zero)
|
||||
{
|
||||
totalBounds = r.bounds;
|
||||
}
|
||||
else
|
||||
{
|
||||
totalBounds.Encapsulate(r.bounds);
|
||||
}
|
||||
}
|
||||
|
||||
return totalBounds;
|
||||
if (totalBounds.center == Vector3.zero)
|
||||
{
|
||||
totalBounds = r.bounds;
|
||||
}
|
||||
else
|
||||
{
|
||||
totalBounds.Encapsulate(r.bounds);
|
||||
}
|
||||
}
|
||||
|
||||
void OnEnable()
|
||||
{
|
||||
//Add this Object to global list
|
||||
if (!SelectionManager.selectables.Contains(this))
|
||||
{
|
||||
SelectionManager.selectables.Add(this);
|
||||
}
|
||||
}
|
||||
return totalBounds;
|
||||
}
|
||||
|
||||
void OnDisable()
|
||||
void OnEnable()
|
||||
{
|
||||
//Add this Object to global list
|
||||
if (!SelectionManager.selectables.Contains(this))
|
||||
{
|
||||
//Remove this Object from global list
|
||||
if (SelectionManager.selectables.Contains(this))
|
||||
{
|
||||
SelectionManager.selectables.Remove(this);
|
||||
}
|
||||
SelectionManager.selectables.Add(this);
|
||||
}
|
||||
}
|
||||
|
||||
void OnDisable()
|
||||
{
|
||||
SelectionManager.selectables.Remove(this);
|
||||
SelectionManager.selectedObjects.Remove(this);
|
||||
}
|
||||
}
|
||||
@@ -4,6 +4,7 @@ using UnityEngine;
|
||||
using UnityEngine.EventSystems;
|
||||
|
||||
//Thanks to : https://sharpcoderblog.com/blog/unity-3d-rts-style-unit-selection
|
||||
[AddComponentMenu("Speckle/Playground/Selection Manager"), DisallowMultipleComponent]
|
||||
public class SelectionManager : MonoBehaviour
|
||||
{
|
||||
public Texture topLeftBorder;
|
||||
@@ -32,7 +33,7 @@ public class SelectionManager : MonoBehaviour
|
||||
Vector3 mousePosition1;
|
||||
|
||||
public static List<Selectable> selectables = new List<Selectable>();
|
||||
public static List<int> selectedObjects = new List<int>();
|
||||
public static List<Selectable> selectedObjects = new List<Selectable>();
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
@@ -59,14 +60,14 @@ public class SelectionManager : MonoBehaviour
|
||||
Camera camera = Camera.main;
|
||||
if (camera == null)
|
||||
return;
|
||||
|
||||
|
||||
selectedObjects.Clear();
|
||||
for (int i = 0; i < selectables.Count; i++)
|
||||
Bounds viewportBounds = GetViewportBounds(camera, mousePosition1, Input.mousePosition);
|
||||
foreach (var t in selectables)
|
||||
{
|
||||
Bounds viewportBounds = GetViewportBounds(camera, mousePosition1, Input.mousePosition);
|
||||
if (viewportBounds.Contains(camera.WorldToViewportPoint(selectables[i].transform.position)))
|
||||
if (viewportBounds.Contains(camera.WorldToViewportPoint(t.transform.position)))
|
||||
{
|
||||
selectedObjects.Add(i);
|
||||
selectedObjects.Add(t);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -86,7 +87,7 @@ public class SelectionManager : MonoBehaviour
|
||||
Camera camera = Camera.main;
|
||||
for (int i = 0; i < selectedObjects.Count; i++)
|
||||
{
|
||||
DrawSelectionIndicator(camera, selectables[selectedObjects[i]].GetObjectBounds());
|
||||
DrawSelectionIndicator(camera, selectedObjects[i].GetObjectBounds());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
using System;
|
||||
using System.Collections.Concurrent;
|
||||
using System.Collections.Immutable;
|
||||
using System.Linq;
|
||||
using Speckle.ConnectorUnity;
|
||||
using UnityEngine;
|
||||
|
||||
[RequireComponent(typeof(Sender)), ExecuteAlways]
|
||||
[Obsolete]
|
||||
public class SendChildrenToSpeckle : MonoBehaviour
|
||||
{
|
||||
public LayerMask layerMask;
|
||||
public string streamId;
|
||||
public string branchName = "main";
|
||||
public bool createCommit = true;
|
||||
|
||||
private Sender sender;
|
||||
|
||||
void Awake()
|
||||
{
|
||||
sender = GetComponent<Sender>();
|
||||
}
|
||||
|
||||
[ContextMenu(nameof(Send))]
|
||||
public void Send()
|
||||
{
|
||||
var selected = GetComponentsInChildren<Transform>()
|
||||
.Where(t => t != this.transform)
|
||||
.Select(o => o.gameObject)
|
||||
.ToImmutableHashSet();
|
||||
|
||||
Debug.Log("starting send...");
|
||||
sender.Send(
|
||||
streamId,
|
||||
selected,
|
||||
null,
|
||||
branchName,
|
||||
createCommit,
|
||||
onErrorAction: OnError,
|
||||
onProgressAction: OnProgress,
|
||||
onDataSentAction: OnSent
|
||||
);
|
||||
}
|
||||
|
||||
private void OnSent(string objectId)
|
||||
{
|
||||
Debug.Log($"Data sent {objectId}", this);
|
||||
}
|
||||
|
||||
private void OnError(string message, Exception e)
|
||||
{
|
||||
Debug.LogError($"Error while sending {message} \n {e}", this);
|
||||
}
|
||||
|
||||
private void OnProgress(ConcurrentDictionary<string, int> dict)
|
||||
{
|
||||
Debug.Log($"progress was made", this);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 06440602a29587942a9b041f6e277a93
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"name": "Speckle.Extra",
|
||||
"references":[ "GUID:eed1b8b83e2c0074d9e5de2348e3ff72", "GUID:e6adfdc4e436206479f48eafc82f32b5", "GUID:d274441ecc3eb3f43b093eec1503d681", "GUID:50d889142fdf9de4b8501c6eaa4b3225" ]
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5e69a9305ecfb37438ec1f98750d0b13
|
||||
AssemblyDefinitionImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2822f83843986b844820ecb3fe7c2c98
|
||||
guid: 56f15216bd310954bb57d0900839c613
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
@@ -0,0 +1,28 @@
|
||||
%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: Normals
|
||||
m_Shader: {fileID: 4800000, guid: 75756b5b04ca7b5438e346a8f9f754ba, type: 3}
|
||||
m_ShaderKeywords:
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Floats: []
|
||||
m_Colors: []
|
||||
m_BuildTextureStacks: []
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 763d54739fbe63e4bbd1598690d1af38
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 2100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,49 @@
|
||||
Shader "Unlit/Normals"
|
||||
{
|
||||
Properties
|
||||
{
|
||||
}
|
||||
SubShader
|
||||
{
|
||||
Tags { "RenderType"="Opaque" }
|
||||
LOD 100
|
||||
|
||||
Pass
|
||||
{
|
||||
CGPROGRAM
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
|
||||
#include "UnityCG.cginc"
|
||||
|
||||
struct appdata
|
||||
{
|
||||
float4 vertex : POSITION;
|
||||
half3 normal : NORMAL;
|
||||
};
|
||||
|
||||
struct v2f
|
||||
{
|
||||
float4 vertex : SV_POSITION;
|
||||
half3 normal : NORMAL;
|
||||
};
|
||||
|
||||
v2f vert (appdata v)
|
||||
{
|
||||
v2f o;
|
||||
o.vertex = UnityObjectToClipPos(v.vertex);
|
||||
o.normal = v.normal;
|
||||
|
||||
return o;
|
||||
}
|
||||
|
||||
half4 frag (v2f i) : SV_Target
|
||||
{
|
||||
half4 color = 0;
|
||||
color.rgb = i.normal * 0.5 + 0.5;
|
||||
return color;
|
||||
}
|
||||
ENDCG
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 75756b5b04ca7b5438e346a8f9f754ba
|
||||
ShaderImporter:
|
||||
externalObjects: {}
|
||||
defaultTextures: []
|
||||
nonModifiableTextures: []
|
||||
preprocessorOverride: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,87 @@
|
||||
%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: SpeckleSurface
|
||||
m_Shader: {fileID: 4800000, guid: 837fc98dbf6a92c479b902184ca947bf, 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
|
||||
- _GridSize: 128
|
||||
- _Margin: 0.15
|
||||
- _Metallic: 0
|
||||
- _Mode: 0
|
||||
- _Mul: 8192
|
||||
- _NormalSaturation: 0.03
|
||||
- _OcclusionStrength: 1
|
||||
- _Parallax: 0.02
|
||||
- _Saturation: 0.323
|
||||
- _SmoothnessSaturation: 0.02
|
||||
- _SmoothnessTextureChannel: 0
|
||||
- _SpecularHighlights: 1
|
||||
- _SrcBlend: 1
|
||||
- _Thickness: 0.32
|
||||
- _UVSec: 0
|
||||
- _ZWrite: 1
|
||||
m_Colors:
|
||||
- _Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _Color0: {r: 0.6, g: 0.6, b: 0.6, a: 1}
|
||||
- _Color1: {r: 0.57, g: 0.57, b: 0.57, a: 1}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2830afbce900e634985de6a3930d9608
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 2100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,128 @@
|
||||
Shader "Custom/SpeckleSurface"
|
||||
{
|
||||
Properties
|
||||
{
|
||||
[Header(Cube)]
|
||||
_Thickness("Thickness", Range(0, 1)) = 0.32
|
||||
_Margin("Margin", Range(0, 1)) = 0.15
|
||||
_NormalSaturation("Normal Saturation", range(0,1)) = 0.03
|
||||
_SmoothnessSaturation("Smoothness Saturation", range(0,1)) = 0.02
|
||||
|
||||
[Header(Tiling)]
|
||||
_Mul("Multiple", int) = 8192
|
||||
_GridSize("Grid Size", int) = 128
|
||||
|
||||
_Color0("Color 0", Color) = (0.6, 0.6, 0.6, 1)
|
||||
_Color1("Color 1", Color) = (0.57, 0.57, 0.57, 1)
|
||||
_MainTex ("Albedo (RGB)", 2D) = "white" {}
|
||||
}
|
||||
SubShader
|
||||
{
|
||||
Tags { "RenderType"="Opaque" }
|
||||
LOD 200
|
||||
|
||||
CGPROGRAM
|
||||
// Physically based Standard lighting model, and enable shadows on all light types
|
||||
#pragma surface surf Standard fullforwardshadows
|
||||
|
||||
// Use shader model 3.0 target, to get nicer looking lighting
|
||||
//#pragma target 3.0
|
||||
|
||||
struct Input
|
||||
{
|
||||
float2 uv_MainTex;
|
||||
};
|
||||
|
||||
sampler2D _MainTex;
|
||||
|
||||
float _Thickness;
|
||||
float _Margin;
|
||||
int _Mul;
|
||||
int _GridSize;
|
||||
|
||||
fixed4 _Color0;
|
||||
fixed4 _Color1;
|
||||
float _NormalSaturation;
|
||||
float _SmoothnessSaturation;
|
||||
|
||||
// Add instancing support for this shader. You need to check 'Enable Instancing' on materials that use the shader.
|
||||
// See https://docs.unity3d.com/Manual/GPUInstancing.html for more information about instancing.
|
||||
// #pragma instancing_options assumeuniformscaling
|
||||
//UNITY_INSTANCING_BUFFER_START(Props)
|
||||
// put more per-instance properties here
|
||||
//UNITY_INSTANCING_BUFFER_END(Props)
|
||||
|
||||
|
||||
fixed speckleSample(float2 pos)
|
||||
{
|
||||
// sample the texture
|
||||
const fixed top = +0.5;
|
||||
const fixed left = -1;
|
||||
const fixed base = -0.5;
|
||||
|
||||
bool invert;
|
||||
{ //Fine Grid
|
||||
float2 grid_pos = (pos + 0.5) * _Mul / 2.0;
|
||||
grid_pos = grid_pos - floor(grid_pos);
|
||||
invert = grid_pos.x > 0.5 ^ grid_pos.y > 0.5;
|
||||
}
|
||||
|
||||
|
||||
float2 cell_pos = (pos + 0.5) * _Mul;
|
||||
cell_pos = cell_pos - floor(cell_pos);
|
||||
//cell_pos between 0-1 for each Speckle cube
|
||||
|
||||
fixed grey;
|
||||
|
||||
//Cube
|
||||
{
|
||||
if(cell_pos.x + cell_pos.y < 1.0)
|
||||
grey = left;
|
||||
else
|
||||
grey = top;
|
||||
|
||||
if(cell_pos.x > _Thickness && cell_pos.y < 1.0 -_Thickness)
|
||||
grey = base;
|
||||
}
|
||||
|
||||
if(invert) grey = grey - 1;
|
||||
|
||||
//Ears
|
||||
if( cell_pos.x + cell_pos.y < _Thickness
|
||||
|| 1.0 - cell_pos.x + 1.0 - cell_pos.y < _Thickness)
|
||||
{
|
||||
grey = 0;
|
||||
}
|
||||
|
||||
//Margins
|
||||
const bool inCube = cell_pos.x > _Margin && cell_pos.y < 1.0 -_Margin;
|
||||
if(!inCube) grey = 0;
|
||||
|
||||
return grey;
|
||||
}
|
||||
|
||||
|
||||
void surf (Input IN, inout SurfaceOutputStandard o)
|
||||
{
|
||||
fixed4 background = _Color0;
|
||||
|
||||
//Coarse grid
|
||||
float2 grid_pos = (IN.uv_MainTex + 0.5) * _Mul / _GridSize;
|
||||
grid_pos = grid_pos - floor(grid_pos);
|
||||
if(grid_pos.x > 0.5 ^ grid_pos.y > 0.5)
|
||||
{
|
||||
background = _Color1;
|
||||
}
|
||||
|
||||
const half grey = speckleSample(IN.uv_MainTex);
|
||||
|
||||
o.Albedo = background;
|
||||
o.Metallic = 0.0;
|
||||
o.Normal = o.Normal + (grey + 1) * _NormalSaturation;
|
||||
o.Smoothness = grey * _SmoothnessSaturation;
|
||||
o.Alpha = background.a;
|
||||
}
|
||||
ENDCG
|
||||
}
|
||||
FallBack "Diffuse"
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 837fc98dbf6a92c479b902184ca947bf
|
||||
ShaderImporter:
|
||||
externalObjects: {}
|
||||
defaultTextures: []
|
||||
nonModifiableTextures: []
|
||||
preprocessorOverride: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,47 @@
|
||||
Shader "Unlit/UVs"
|
||||
{
|
||||
Properties
|
||||
{
|
||||
}
|
||||
SubShader
|
||||
{
|
||||
Tags { "RenderType"="Opaque" }
|
||||
LOD 100
|
||||
|
||||
Pass
|
||||
{
|
||||
CGPROGRAM
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
|
||||
#include "UnityCG.cginc"
|
||||
|
||||
struct appdata
|
||||
{
|
||||
float4 vertex : POSITION;
|
||||
float2 uv : TEXCOORD0;
|
||||
};
|
||||
|
||||
struct v2f
|
||||
{
|
||||
float4 vertex : SV_POSITION;
|
||||
float2 colors : TEXCOORD0;
|
||||
};
|
||||
|
||||
v2f vert (appdata v)
|
||||
{
|
||||
v2f o;
|
||||
o.vertex = UnityObjectToClipPos(v.vertex);
|
||||
o.colors = v.uv;
|
||||
|
||||
return o;
|
||||
}
|
||||
|
||||
half4 frag (v2f i) : SV_Target
|
||||
{
|
||||
return half4(i.colors.x, i.colors.y, 0, 0);
|
||||
}
|
||||
ENDCG
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f6778d5072232804689f36bb771a2122
|
||||
ShaderImporter:
|
||||
externalObjects: {}
|
||||
defaultTextures: []
|
||||
nonModifiableTextures: []
|
||||
preprocessorOverride: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,78 @@
|
||||
%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: Uvs
|
||||
m_Shader: {fileID: 4800000, guid: f6778d5072232804689f36bb771a2122, 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}
|
||||
m_BuildTextureStacks: []
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6fe0ba5d1c59c7548be17ef9fb8e2e40
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 2100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,35 @@
|
||||
%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: VertexColors
|
||||
m_Shader: {fileID: 4800000, guid: 3b849de517d871d46874414758a096f2, 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}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Floats:
|
||||
- _Shininess: 0.078125
|
||||
m_Colors:
|
||||
- _Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _SpecColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c84690dfb148c6e4f8343f76b3cad987
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 2100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,47 @@
|
||||
Shader "Unlit/VertexColors"
|
||||
{
|
||||
Properties
|
||||
{
|
||||
}
|
||||
SubShader
|
||||
{
|
||||
Tags { "RenderType"="Opaque" }
|
||||
LOD 100
|
||||
|
||||
Pass
|
||||
{
|
||||
CGPROGRAM
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
|
||||
#include "UnityCG.cginc"
|
||||
|
||||
struct appdata
|
||||
{
|
||||
float4 vertex : POSITION;
|
||||
half4 color : COLOR0;
|
||||
};
|
||||
|
||||
struct v2f
|
||||
{
|
||||
float4 vertex : SV_POSITION;
|
||||
half4 color : COLOR0;
|
||||
};
|
||||
|
||||
v2f vert (appdata v)
|
||||
{
|
||||
v2f o;
|
||||
o.vertex = UnityObjectToClipPos(v.vertex);
|
||||
o.color = v.color;
|
||||
|
||||
return o;
|
||||
}
|
||||
|
||||
half4 frag (v2f i) : SV_Target
|
||||
{
|
||||
return i.color;
|
||||
}
|
||||
ENDCG
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3b849de517d871d46874414758a096f2
|
||||
ShaderImporter:
|
||||
externalObjects: {}
|
||||
defaultTextures: []
|
||||
nonModifiableTextures: []
|
||||
preprocessorOverride: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
+219
-170
@@ -1,195 +1,244 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Immutable;
|
||||
using System.Linq;
|
||||
using Speckle.Core.Api;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using Text = UnityEngine.UI.Text;
|
||||
|
||||
namespace Speckle.ConnectorUnity
|
||||
{
|
||||
public class InteractionLogic : MonoBehaviour
|
||||
{
|
||||
private Receiver receiver;
|
||||
|
||||
public void InitReceiver(Stream stream, bool autoReceive)
|
||||
[Obsolete]
|
||||
public class InteractionLogic : MonoBehaviour
|
||||
{
|
||||
gameObject.name = $"receiver-{stream.id}-{Guid.NewGuid().ToString()}";
|
||||
InitRemove();
|
||||
private Receiver _receiver;
|
||||
|
||||
receiver = gameObject.AddComponent<Receiver>();
|
||||
receiver.Stream = stream;
|
||||
|
||||
var btn = gameObject.transform.Find("Btn").GetComponentInChildren<Button>();
|
||||
var streamText = gameObject.transform.Find("StreamText").GetComponentInChildren<Text>();
|
||||
var statusText = gameObject.transform.Find("StatusText").GetComponentInChildren<Text>();
|
||||
var branchesDropdown = gameObject.transform.Find("Dropdown").GetComponentInChildren<Dropdown>();
|
||||
var receiveProgress = btn.GetComponentInChildren<Slider>();
|
||||
receiveProgress.gameObject.SetActive(false); //hide
|
||||
|
||||
//populate branches
|
||||
branchesDropdown.options.Clear();
|
||||
foreach (var branch in receiver.Stream.branches.items)
|
||||
{
|
||||
branchesDropdown.options.Add(new Dropdown.OptionData(branch.name));
|
||||
}
|
||||
|
||||
//trigger ui refresh, maybe there's a better method
|
||||
branchesDropdown.value = -1;
|
||||
branchesDropdown.value = 0;
|
||||
branchesDropdown.onValueChanged.AddListener(index =>
|
||||
{
|
||||
if (index == -1)
|
||||
return;
|
||||
|
||||
receiver.BranchName = receiver.Stream.branches.items[index].name;
|
||||
});
|
||||
|
||||
receiver.Init(stream.id, autoReceive, true,
|
||||
onDataReceivedAction: (go) =>
|
||||
public void InitReceiver(Stream stream, bool autoReceive)
|
||||
{
|
||||
statusText.text = $"Received {go.name}";
|
||||
MakeButtonsInteractable(true);
|
||||
receiveProgress.value = 0;
|
||||
receiveProgress.gameObject.SetActive(false);
|
||||
gameObject.name = $"receiver-{stream.id}-{Guid.NewGuid().ToString()}";
|
||||
InitRemove();
|
||||
|
||||
AddComponents(go);
|
||||
},
|
||||
onTotalChildrenCountKnown: (count) => { receiver.TotalChildrenCount = count; },
|
||||
onProgressAction: (dict) =>
|
||||
{
|
||||
//Run on a dispatcher as GOs can only be retrieved on the main thread
|
||||
Dispatcher.Instance.Enqueue(() =>
|
||||
{
|
||||
var val = dict.Values.Average() / receiver.TotalChildrenCount;
|
||||
receiveProgress.gameObject.SetActive(true);
|
||||
receiveProgress.value = (float) val;
|
||||
});
|
||||
});
|
||||
_receiver = gameObject.AddComponent<Receiver>();
|
||||
_receiver.Stream = stream;
|
||||
|
||||
var btn = gameObject.transform.Find("Btn").GetComponentInChildren<Button>();
|
||||
var streamText = gameObject.transform.Find("StreamText").GetComponentInChildren<Text>();
|
||||
var statusText = gameObject.transform.Find("StatusText").GetComponentInChildren<Text>();
|
||||
var branchesDropdown = gameObject.transform
|
||||
.Find("Dropdown")
|
||||
.GetComponentInChildren<Dropdown>();
|
||||
var receiveProgress = btn.GetComponentInChildren<Slider>();
|
||||
receiveProgress.gameObject.SetActive(false); //hide
|
||||
|
||||
streamText.text = $"Stream: {stream.name}\nId: {stream.id} - Auto: {autoReceive}";
|
||||
btn.onClick.AddListener(() =>
|
||||
{
|
||||
statusText.text = "Receiving...";
|
||||
MakeButtonsInteractable(false);
|
||||
receiver.Receive();
|
||||
});
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Recursively adds custom components to all children of a GameObject
|
||||
/// </summary>
|
||||
/// <param name="go"></param>
|
||||
private void AddComponents(GameObject go)
|
||||
{
|
||||
for (var i = 0; i < go.transform.childCount; i++)
|
||||
{
|
||||
var child = go.transform.GetChild(i);
|
||||
|
||||
if (child.childCount > 0)
|
||||
{
|
||||
AddComponents(child.gameObject);
|
||||
}
|
||||
|
||||
child.gameObject.AddComponent<Selectable>();
|
||||
|
||||
//Add extra Components
|
||||
//var rigidbody = child.gameObject.AddComponent<Rigidbody>();
|
||||
//rigidbody.mass = 10;
|
||||
}
|
||||
}
|
||||
|
||||
public void InitSender(Stream stream)
|
||||
{
|
||||
gameObject.name = $"sender-{stream.id}-{Guid.NewGuid().ToString()}";
|
||||
InitRemove();
|
||||
|
||||
var sender = gameObject.AddComponent<Sender>();
|
||||
//sender.Stream = stream;
|
||||
|
||||
var btn = gameObject.transform.Find("Btn").GetComponentInChildren<Button>();
|
||||
|
||||
var streamText = gameObject.transform.Find("StreamText").GetComponentInChildren<Text>();
|
||||
var statusText = gameObject.transform.Find("StatusText").GetComponentInChildren<Text>();
|
||||
|
||||
btn.GetComponentInChildren<Text>().text = "Send";
|
||||
statusText.text = "Ready to send";
|
||||
|
||||
var sendProgress = btn.GetComponentInChildren<Slider>();
|
||||
sendProgress.gameObject.SetActive(false); //hide
|
||||
|
||||
streamText.text = $"Stream: {stream.name}\nId: {stream.id}";
|
||||
|
||||
|
||||
btn.onClick.AddListener(() =>
|
||||
{
|
||||
var objs = new List<GameObject>();
|
||||
foreach (var index in SelectionManager.selectedObjects)
|
||||
{
|
||||
objs.Add(SelectionManager.selectables[index].gameObject);
|
||||
}
|
||||
|
||||
if (!objs.Any())
|
||||
{
|
||||
statusText.text = $"No objects selected";
|
||||
return;
|
||||
}
|
||||
|
||||
MakeButtonsInteractable(false);
|
||||
|
||||
statusText.text = "Sending...";
|
||||
sender.Send(stream.id, objs,
|
||||
onProgressAction: (dict) =>
|
||||
//populate branches
|
||||
branchesDropdown.options.Clear();
|
||||
List<Branch> branches = _receiver.Stream.branches.items;
|
||||
branches.Reverse();
|
||||
foreach (Branch branch in branches)
|
||||
{
|
||||
//Run on a dispatcher as GOs can only be retrieved on the main thread
|
||||
Dispatcher.Instance.Enqueue(() =>
|
||||
{
|
||||
var val = dict.Values.Average() / objs.Count;
|
||||
sendProgress.gameObject.SetActive(true);
|
||||
sendProgress.value = (float) val;
|
||||
});
|
||||
},
|
||||
onDataSentAction: (commitId) =>
|
||||
branchesDropdown.options.Add(
|
||||
new Dropdown.OptionData(branch.name.Replace(' ', '\u00A0'))
|
||||
);
|
||||
}
|
||||
|
||||
//trigger ui refresh, maybe there's a better method
|
||||
branchesDropdown.value = -1;
|
||||
branchesDropdown.value = 0;
|
||||
branchesDropdown.onValueChanged.AddListener(index =>
|
||||
{
|
||||
Dispatcher.Instance.Enqueue(() =>
|
||||
{
|
||||
MakeButtonsInteractable(true);
|
||||
statusText.text = $"Sent {commitId}";
|
||||
sendProgress.gameObject.SetActive(false); //hide
|
||||
});
|
||||
if (index == -1)
|
||||
return;
|
||||
|
||||
_receiver.BranchName = branches[index].name;
|
||||
});
|
||||
|
||||
_receiver.Init(
|
||||
stream.id,
|
||||
autoReceive,
|
||||
onDataReceivedAction: (go) =>
|
||||
{
|
||||
statusText.text = $"Received {go.name}";
|
||||
MakeButtonsInteractable(true);
|
||||
receiveProgress.value = 0;
|
||||
receiveProgress.gameObject.SetActive(false);
|
||||
|
||||
AddComponents(go);
|
||||
},
|
||||
onTotalChildrenCountKnown: (count) =>
|
||||
{
|
||||
_receiver.TotalChildrenCount = count;
|
||||
},
|
||||
onProgressAction: (dict) =>
|
||||
{
|
||||
//Run on a dispatcher as GOs can only be retrieved on the main thread
|
||||
Dispatcher
|
||||
.Instance()
|
||||
.Enqueue(() =>
|
||||
{
|
||||
var val = dict.Values.Average() / _receiver.TotalChildrenCount;
|
||||
receiveProgress.gameObject.SetActive(true);
|
||||
receiveProgress.value = (float)val;
|
||||
});
|
||||
}
|
||||
);
|
||||
|
||||
streamText.text = $"Stream: {stream.name}\nId: {stream.id} - Auto: {autoReceive}";
|
||||
btn.onClick.AddListener(() =>
|
||||
{
|
||||
statusText.text = "Receiving...";
|
||||
MakeButtonsInteractable(false);
|
||||
_receiver.Receive();
|
||||
});
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
private void MakeButtonsInteractable(bool interactable)
|
||||
{
|
||||
var selectables = gameObject.transform.GetComponentsInChildren<UnityEngine.UI.Selectable>();
|
||||
foreach (var selectable in selectables)
|
||||
{
|
||||
selectable.interactable = interactable;
|
||||
}
|
||||
}
|
||||
|
||||
private void InitRemove()
|
||||
{
|
||||
var close = gameObject.transform.Find("Close").GetComponentInChildren<Button>();
|
||||
|
||||
close.onClick.AddListener(() =>
|
||||
{
|
||||
//remove received geometry
|
||||
if (receiver != null)
|
||||
/// <summary>
|
||||
/// Recursively adds custom components to all children of a GameObject
|
||||
/// </summary>
|
||||
/// <param name="go"></param>
|
||||
private void AddComponents(GameObject go)
|
||||
{
|
||||
Destroy(receiver.ReceivedData);
|
||||
for (var i = 0; i < go.transform.childCount; i++)
|
||||
{
|
||||
var child = go.transform.GetChild(i);
|
||||
|
||||
if (child.childCount > 0)
|
||||
{
|
||||
AddComponents(child.gameObject);
|
||||
}
|
||||
|
||||
child.gameObject.AddComponent<Selectable>();
|
||||
|
||||
//Add extra Components
|
||||
//var rigidbody = child.gameObject.AddComponent<Rigidbody>();
|
||||
//rigidbody.mass = 10;
|
||||
}
|
||||
}
|
||||
|
||||
//update ui
|
||||
GameObject.Find("_SpeckleExamples").GetComponent<SpeckleExamples>().RemoveStreamPrefab(gameObject);
|
||||
public void InitSender(Stream stream)
|
||||
{
|
||||
gameObject.name = $"sender-{stream.id}-{Guid.NewGuid().ToString()}";
|
||||
InitRemove();
|
||||
|
||||
//kill it
|
||||
Destroy(gameObject);
|
||||
});
|
||||
var sender = gameObject.AddComponent<Sender>();
|
||||
var btn = gameObject.transform.Find("Btn").GetComponentInChildren<Button>();
|
||||
|
||||
var streamText = gameObject.transform.Find("StreamText").GetComponentInChildren<Text>();
|
||||
var statusText = gameObject.transform.Find("StatusText").GetComponentInChildren<Text>();
|
||||
|
||||
btn.GetComponentInChildren<Text>().text = "Send";
|
||||
statusText.text = "Ready to send";
|
||||
|
||||
var sendProgress = btn.GetComponentInChildren<Slider>();
|
||||
sendProgress.gameObject.SetActive(false); //hide
|
||||
|
||||
streamText.text = $"Stream: {stream.name}\nId: {stream.id}";
|
||||
|
||||
btn.onClick.AddListener(() =>
|
||||
{
|
||||
var objs = SelectionManager.selectedObjects
|
||||
.Select(s => s.gameObject)
|
||||
.ToImmutableHashSet();
|
||||
|
||||
if (!objs.Any())
|
||||
{
|
||||
statusText.text = $"No objects selected";
|
||||
return;
|
||||
}
|
||||
|
||||
MakeButtonsInteractable(false);
|
||||
|
||||
statusText.text = "Sending...";
|
||||
try
|
||||
{
|
||||
sender.Send(
|
||||
stream.id,
|
||||
objs,
|
||||
onProgressAction: (dict) =>
|
||||
{
|
||||
//Run on a dispatcher as GOs can only be retrieved on the main thread
|
||||
Dispatcher
|
||||
.Instance()
|
||||
.Enqueue(() =>
|
||||
{
|
||||
var val = dict.Values.Average() / objs.Count;
|
||||
sendProgress.gameObject.SetActive(true);
|
||||
sendProgress.value = (float)val;
|
||||
});
|
||||
},
|
||||
onDataSentAction: (objectId) =>
|
||||
{
|
||||
Debug.Log($"Send operation completed, object id: {objectId}", this);
|
||||
Dispatcher
|
||||
.Instance()
|
||||
.Enqueue(() =>
|
||||
{
|
||||
MakeButtonsInteractable(true);
|
||||
statusText.text = $"Sent {objectId}";
|
||||
sendProgress.gameObject.SetActive(false); //hide
|
||||
});
|
||||
},
|
||||
onErrorAction: (message, e) =>
|
||||
{
|
||||
Debug.LogError("Send operation Failed!", this);
|
||||
Dispatcher
|
||||
.Instance()
|
||||
.Enqueue(() =>
|
||||
{
|
||||
MakeButtonsInteractable(true);
|
||||
statusText.text = $"Error {message}";
|
||||
sendProgress.gameObject.SetActive(false); //hide
|
||||
Debug.LogError(e, this);
|
||||
});
|
||||
}
|
||||
);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Dispatcher
|
||||
.Instance()
|
||||
.Enqueue(() =>
|
||||
{
|
||||
MakeButtonsInteractable(true);
|
||||
statusText.text = $"Error {e.Message}";
|
||||
sendProgress.gameObject.SetActive(false); //hide
|
||||
Debug.LogError(e, this);
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void MakeButtonsInteractable(bool interactable)
|
||||
{
|
||||
var selectables =
|
||||
gameObject.transform.GetComponentsInChildren<UnityEngine.UI.Selectable>();
|
||||
foreach (var selectable in selectables)
|
||||
{
|
||||
selectable.interactable = interactable;
|
||||
}
|
||||
}
|
||||
|
||||
private void InitRemove()
|
||||
{
|
||||
var close = gameObject.transform.Find("Close").GetComponentInChildren<Button>();
|
||||
|
||||
close.onClick.AddListener(() =>
|
||||
{
|
||||
//remove received geometry
|
||||
if (_receiver != null)
|
||||
{
|
||||
Destroy(_receiver.ReceivedData);
|
||||
}
|
||||
|
||||
//update ui
|
||||
GameObject
|
||||
.Find("_SpeckleExamples")
|
||||
.GetComponent<SpeckleExamples>()
|
||||
.RemoveStreamPrefab(gameObject);
|
||||
|
||||
//kill it
|
||||
Destroy(gameObject);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9e8bc8cda58ea6c41a8d9c89bf68f726
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 978be06c8e5f29d42910ca9985d0e9ab
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 98d0614354f7fc04cb4b030f4c54810f
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5b42d273c4ee09a43b5dff30f6e05988
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e50a8f3b511f13748b134a3a5e000b0f
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f823114029cf4814c962a9b71f81705d
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,29 +0,0 @@
|
||||
using Objects.BuiltElements;
|
||||
using Objects.Geometry;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Objects.Converter.Unity
|
||||
{
|
||||
public partial class ConverterUnity
|
||||
{
|
||||
/// <summary>
|
||||
/// Converts a Speckle View3D to a GameObject
|
||||
/// </summary>
|
||||
/// <param name="point"></param>
|
||||
/// <returns></returns>
|
||||
public GameObject View3DToNative(View3D speckleView)
|
||||
{
|
||||
var go = new GameObject(speckleView.name);
|
||||
var camera = go.AddComponent<Camera>();
|
||||
camera.transform.position = VectorByCoordinates(speckleView.origin.x, speckleView.origin.y, speckleView.origin.z,
|
||||
speckleView.origin.units);
|
||||
camera.transform.forward = VectorByCoordinates(speckleView.forwardDirection.x, speckleView.forwardDirection.y,
|
||||
speckleView.forwardDirection.z, speckleView.forwardDirection.units);
|
||||
camera.transform.up = VectorByCoordinates(speckleView.upDirection.x, speckleView.upDirection.y,
|
||||
speckleView.upDirection.z, speckleView.upDirection.units);
|
||||
|
||||
AttachSpeckleProperties(go, speckleView.GetMembers());
|
||||
return go;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,390 +0,0 @@
|
||||
using Objects.Geometry;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using Objects.Other;
|
||||
using Speckle.ConnectorUnity;
|
||||
using Speckle.Core.Models;
|
||||
using UnityEngine;
|
||||
using Mesh = Objects.Geometry.Mesh;
|
||||
|
||||
namespace Objects.Converter.Unity
|
||||
{
|
||||
public partial class ConverterUnity
|
||||
{
|
||||
#region helper methods
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="x"></param>
|
||||
/// <param name="y"></param>
|
||||
/// <param name="z"></param>
|
||||
/// <returns></returns>
|
||||
public Vector3 VectorByCoordinates(double x, double y, double z, string units)
|
||||
{
|
||||
// switch y and z
|
||||
return new Vector3((float) ScaleToNative(x, units), (float) ScaleToNative(z, units),
|
||||
(float) ScaleToNative(y, units));
|
||||
}
|
||||
|
||||
public Vector3 VectorFromPoint(Point p)
|
||||
{
|
||||
// switch y and z
|
||||
return new Vector3((float) ScaleToNative(p.x, p.units), (float) ScaleToNative(p.z, p.units),
|
||||
(float) ScaleToNative(p.y, p.units));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="ptValues"></param>
|
||||
/// <returns></returns>
|
||||
// public Vector3 ArrayToPoint(double[] ptValues, string units)
|
||||
// {
|
||||
// double x = ptValues[0];
|
||||
// double y = ptValues[1];
|
||||
// double z = ptValues[2];
|
||||
//
|
||||
// return PointByCoordinates(x, y, z, units);
|
||||
// }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="arr"></param>
|
||||
/// <returns></returns>
|
||||
public Vector3[] ArrayToPoints(IEnumerable<double> arr, string units)
|
||||
{
|
||||
if (arr.Count() % 3 != 0) throw new Exception("Array malformed: length%3 != 0.");
|
||||
|
||||
Vector3[] points = new Vector3[arr.Count() / 3];
|
||||
var asArray = arr.ToArray();
|
||||
for (int i = 2, k = 0; i < arr.Count(); i += 3)
|
||||
points[k++] = VectorByCoordinates(asArray[i - 2], asArray[i - 1], asArray[i], units);
|
||||
|
||||
return points;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region ToSpeckle
|
||||
|
||||
//TODO: more of these
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="obj"></param>
|
||||
/// <returns></returns>
|
||||
public Point PointToSpeckle(Vector3 p)
|
||||
{
|
||||
//switch y and z
|
||||
return new Point(p.x, p.z, p.y);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Converts a Speckle mesh to a GameObject with a mesh renderer
|
||||
/// </summary>
|
||||
/// <param name="speckleMesh"></param>
|
||||
/// <returns></returns>
|
||||
public Mesh MeshToSpeckle(GameObject go)
|
||||
{
|
||||
//TODO: support multiple filters?
|
||||
var filter = go.GetComponent<MeshFilter>();
|
||||
if (filter == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
//convert triangle array into speckleMesh faces
|
||||
List<int> faces = new List<int>();
|
||||
int i = 0;
|
||||
//store them here, makes it like 1000000x faster?
|
||||
var triangles = filter.mesh.triangles;
|
||||
while (i < triangles.Length)
|
||||
{
|
||||
faces.Add(0);
|
||||
|
||||
faces.Add(triangles[i + 0]);
|
||||
faces.Add(triangles[i + 2]);
|
||||
faces.Add(triangles[i + 1]);
|
||||
i += 3;
|
||||
}
|
||||
|
||||
var mesh = new Mesh();
|
||||
// get the speckle data from the go here
|
||||
// so that if the go comes from speckle, typed props will get overridden below
|
||||
AttachUnityProperties(mesh, go);
|
||||
|
||||
mesh.units = ModelUnits;
|
||||
|
||||
var vertices = filter.mesh.vertices;
|
||||
foreach (var vertex in vertices)
|
||||
{
|
||||
var p = go.transform.TransformPoint(vertex);
|
||||
var sp = PointToSpeckle(p);
|
||||
mesh.vertices.Add(sp.x);
|
||||
mesh.vertices.Add(sp.y);
|
||||
mesh.vertices.Add(sp.z);
|
||||
}
|
||||
|
||||
mesh.faces = faces;
|
||||
|
||||
return mesh;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region ToNative
|
||||
|
||||
private GameObject NewPointBasedGameObject(Vector3[] points, string name)
|
||||
{
|
||||
if (points.Length == 0) return null;
|
||||
|
||||
float pointDiameter = 1; //TODO: figure out how best to change this?
|
||||
|
||||
var go = new GameObject();
|
||||
go.name = name;
|
||||
|
||||
var lineRenderer = go.AddComponent<LineRenderer>();
|
||||
|
||||
lineRenderer.positionCount = points.Length;
|
||||
lineRenderer.SetPositions(points);
|
||||
lineRenderer.numCornerVertices = lineRenderer.numCapVertices = 8;
|
||||
lineRenderer.startWidth = lineRenderer.endWidth = pointDiameter;
|
||||
|
||||
return go;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Converts a Speckle point to a GameObject with a line renderer
|
||||
/// </summary>
|
||||
/// <param name="point"></param>
|
||||
/// <returns></returns>
|
||||
public GameObject PointToNative(Point point)
|
||||
{
|
||||
Vector3 newPt = VectorByCoordinates(point.x, point.y, point.z, point.units);
|
||||
|
||||
var go = NewPointBasedGameObject(new Vector3[2] {newPt, newPt}, point.speckle_type);
|
||||
return go;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Converts a Speckle line to a GameObject with a line renderer
|
||||
/// </summary>
|
||||
/// <param name="line"></param>
|
||||
/// <returns></returns>
|
||||
public GameObject LineToNative(Line line)
|
||||
{
|
||||
var points = new List<Vector3> {VectorFromPoint(line.start), VectorFromPoint(line.end)};
|
||||
|
||||
var go = NewPointBasedGameObject(points.ToArray(), line.speckle_type);
|
||||
return go;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Converts a Speckle polyline to a GameObject with a line renderer
|
||||
/// </summary>
|
||||
/// <param name="polyline"></param>
|
||||
/// <returns></returns>
|
||||
public GameObject PolylineToNative(Polyline polyline)
|
||||
{
|
||||
var points = polyline.points.Select(x => VectorFromPoint(x));
|
||||
|
||||
var go = NewPointBasedGameObject(points.ToArray(), polyline.speckle_type);
|
||||
return go;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Converts a Speckle curve to a GameObject with a line renderer
|
||||
/// </summary>
|
||||
/// <param name="curve"></param>
|
||||
/// <returns></returns>
|
||||
public GameObject CurveToNative(Curve curve)
|
||||
{
|
||||
var points = ArrayToPoints(curve.points, curve.units);
|
||||
var go = NewPointBasedGameObject(points.ToArray(), curve.speckle_type);
|
||||
return go;
|
||||
}
|
||||
|
||||
|
||||
public GameObject MeshToNative(Base speckleMeshObject)
|
||||
{
|
||||
if (!(speckleMeshObject["displayMesh"] is Mesh))
|
||||
return null;
|
||||
|
||||
return MeshToNative(speckleMeshObject["displayMesh"] as Mesh,
|
||||
speckleMeshObject["renderMaterial"] as RenderMaterial, speckleMeshObject.GetMembers());
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Converts a Speckle mesh to a GameObject with a mesh renderer
|
||||
/// </summary>
|
||||
/// <param name="speckleMesh">Mesh to convert</param>
|
||||
/// <param name="renderMaterial">If provided will override the renderMaterial on the mesh itself</param>
|
||||
/// <param name="properties">If provided will override the properties on the mesh itself</param>
|
||||
/// <returns></returns>
|
||||
public GameObject MeshToNative(Mesh speckleMesh, RenderMaterial renderMaterial = null,
|
||||
Dictionary<string, object> properties = null)
|
||||
{
|
||||
if (speckleMesh.vertices.Count == 0 || speckleMesh.faces.Count == 0)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
var recentreMeshTransforms = true; //TODO: figure out how best to change this?
|
||||
|
||||
var verts = ArrayToPoints(speckleMesh.vertices, speckleMesh.units).ToList();
|
||||
//convert speckleMesh.faces into triangle array
|
||||
List<int> tris = new List<int>();
|
||||
int i = 0;
|
||||
while (i < speckleMesh.faces.Count)
|
||||
{
|
||||
if (speckleMesh.faces[i] == 0)
|
||||
{
|
||||
//Triangles
|
||||
tris.Add(speckleMesh.faces[i + 1]);
|
||||
tris.Add(speckleMesh.faces[i + 3]);
|
||||
tris.Add(speckleMesh.faces[i + 2]);
|
||||
i += 4;
|
||||
}
|
||||
else
|
||||
{
|
||||
//Quads to triangles
|
||||
tris.Add(speckleMesh.faces[i + 1]);
|
||||
tris.Add(speckleMesh.faces[i + 3]);
|
||||
tris.Add(speckleMesh.faces[i + 2]);
|
||||
|
||||
tris.Add(speckleMesh.faces[i + 1]);
|
||||
tris.Add(speckleMesh.faces[i + 4]);
|
||||
tris.Add(speckleMesh.faces[i + 3]);
|
||||
|
||||
i += 5;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
var go = new GameObject();
|
||||
go.name = speckleMesh.speckle_type;
|
||||
|
||||
var mesh = go.AddComponent<MeshFilter>().mesh;
|
||||
var meshRenderer = go.AddComponent<MeshRenderer>();
|
||||
|
||||
var speckleMaterial = renderMaterial ?? (RenderMaterial)speckleMesh["renderMaterial"];
|
||||
meshRenderer.material = GetMaterial(speckleMaterial);
|
||||
|
||||
|
||||
if (verts.Count >= 65535)
|
||||
mesh.indexFormat = UnityEngine.Rendering.IndexFormat.UInt32;
|
||||
|
||||
// center transform pivot according to the bounds of the model
|
||||
if (recentreMeshTransforms)
|
||||
{
|
||||
Bounds meshBounds = new Bounds();
|
||||
meshBounds.center = verts[0];
|
||||
|
||||
verts.ForEach(x => meshBounds.Encapsulate(x));
|
||||
|
||||
go.transform.position = meshBounds.center;
|
||||
|
||||
// offset mesh vertices
|
||||
for (int l = 0; l < verts.Count; l++)
|
||||
{
|
||||
verts[l] -= meshBounds.center;
|
||||
}
|
||||
}
|
||||
|
||||
// assign mesh properties
|
||||
mesh.vertices = verts.ToArray();
|
||||
mesh.triangles = tris.ToArray();
|
||||
|
||||
|
||||
mesh.Optimize();
|
||||
mesh.RecalculateNormals();
|
||||
mesh.RecalculateTangents();
|
||||
|
||||
|
||||
//generate uvs doesn't work as intended. Leaving out for now
|
||||
//GenerateUVs (ref mesh);
|
||||
|
||||
//Add mesh collider
|
||||
MeshCollider mc = go.AddComponent<MeshCollider>();
|
||||
mc.sharedMesh = mesh;
|
||||
//mc.convex = true;
|
||||
|
||||
|
||||
//attach properties on this very mesh
|
||||
//means the mesh originated in Rhino or similar
|
||||
if (properties == null)
|
||||
{
|
||||
var meshprops = typeof(Mesh).GetProperties(BindingFlags.Instance | BindingFlags.Public).Select(x => x.Name)
|
||||
.ToList();
|
||||
properties = speckleMesh.GetMembers()
|
||||
.Where(x => !meshprops.Contains(x.Key))
|
||||
.ToDictionary(x => x.Key, x => x.Value);
|
||||
}
|
||||
|
||||
AttachSpeckleProperties(go, properties);
|
||||
return go;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private Material GetMaterial(RenderMaterial renderMaterial)
|
||||
{
|
||||
//todo support more complex materials
|
||||
var shader = Shader.Find("Standard");
|
||||
Material mat = new Material(shader);
|
||||
|
||||
//if a renderMaterial is passed use that, otherwise try get it from the mesh itself
|
||||
|
||||
if (renderMaterial != null)
|
||||
{
|
||||
// 1. match material by name, if any
|
||||
var matByName = ContextObjects.FirstOrDefault(x => ((Material)x.NativeObject).name == renderMaterial.name);
|
||||
if (matByName!=null)
|
||||
{
|
||||
return matByName.NativeObject as Material;
|
||||
}
|
||||
|
||||
// 2. re-create material by setting diffuse color and transparency on standard shaders
|
||||
if (renderMaterial.opacity < 1)
|
||||
{
|
||||
shader = Shader.Find("Transparent/Diffuse");
|
||||
mat = new Material(shader);
|
||||
}
|
||||
|
||||
var c = renderMaterial.diffuse.ToUnityColor();
|
||||
mat.color = new Color(c.r, c.g, c.b, Convert.ToSingle(renderMaterial.opacity));
|
||||
|
||||
return mat;
|
||||
}
|
||||
|
||||
// 3. if not renderMaterial was passed, the default shader will be used
|
||||
return mat;
|
||||
}
|
||||
|
||||
private void AttachSpeckleProperties(GameObject go, Dictionary<string, object> properties)
|
||||
{
|
||||
var sd = go.AddComponent<SpeckleProperties>();
|
||||
sd.Data = properties;
|
||||
}
|
||||
|
||||
|
||||
private void AttachUnityProperties(Base @base, GameObject go)
|
||||
{
|
||||
var sd = go.GetComponent<SpeckleProperties>();
|
||||
if (sd == null || sd.Data == null)
|
||||
return;
|
||||
foreach (var key in sd.Data.Keys)
|
||||
{
|
||||
@base[key] = sd.Data[key];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
using Objects.Geometry;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using UnityEngine;
|
||||
using Mesh = Objects.Geometry.Mesh;
|
||||
|
||||
namespace Objects.Converter.Unity
|
||||
{
|
||||
public partial class ConverterUnity
|
||||
{
|
||||
public string ModelUnits = Speckle.Core.Kits.Units.Meters; //the default Unity units are meters
|
||||
private double ScaleToNative(double value, string units)
|
||||
{
|
||||
var f = Speckle.Core.Kits.Units.GetConversionFactor(units, ModelUnits);
|
||||
return value * f;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,126 +0,0 @@
|
||||
using Objects.Geometry;
|
||||
using Speckle.Core.Kits;
|
||||
using Speckle.Core.Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Objects.BuiltElements;
|
||||
using UnityEngine;
|
||||
using Mesh = Objects.Geometry.Mesh;
|
||||
|
||||
namespace Objects.Converter.Unity
|
||||
{
|
||||
public partial class ConverterUnity : ISpeckleConverter
|
||||
{
|
||||
#region implemented methods
|
||||
|
||||
public string Description => "Default Speckle Kit for Unity";
|
||||
public string Name => nameof(ConverterUnity);
|
||||
public string Author => "Speckle";
|
||||
public string WebsiteOrEmail => "https://speckle.systems";
|
||||
|
||||
public IEnumerable<string> GetServicedApplications() => new string[] {Applications.Other}; //TODO: add unity
|
||||
|
||||
public HashSet<Exception> ConversionErrors { get; private set; } = new HashSet<Exception>();
|
||||
|
||||
|
||||
public List<ApplicationPlaceholderObject> ContextObjects { get; set; } = new List<ApplicationPlaceholderObject>();
|
||||
public void SetContextDocument(object doc) => throw new NotImplementedException();
|
||||
|
||||
public void SetContextObjects(List<ApplicationPlaceholderObject> objects) => ContextObjects = objects;
|
||||
|
||||
public void SetPreviousContextObjects(List<ApplicationPlaceholderObject> objects) =>
|
||||
throw new NotImplementedException();
|
||||
|
||||
public Base ConvertToSpeckle(object @object)
|
||||
{
|
||||
switch (@object)
|
||||
{
|
||||
case GameObject o:
|
||||
if (o.GetComponent<MeshFilter>() != null)
|
||||
return MeshToSpeckle(o);
|
||||
throw new NotSupportedException();
|
||||
default:
|
||||
throw new NotSupportedException();
|
||||
}
|
||||
}
|
||||
|
||||
public object ConvertToNative(Base @object)
|
||||
{
|
||||
switch (@object)
|
||||
{
|
||||
// case Point o:
|
||||
// return PointToNative(o);
|
||||
// case Line o:
|
||||
// return LineToNative(o);
|
||||
// case Polyline o:
|
||||
// return PolylineToNative(o);
|
||||
// case Curve o:
|
||||
// return CurveToNative(o);
|
||||
// case View3D o:
|
||||
// return View3DToNative(o);
|
||||
case Mesh o:
|
||||
return MeshToNative(o);
|
||||
//Built elements with a mesh representation implement this interface
|
||||
case IDisplayMesh o:
|
||||
return MeshToNative((Base) o);
|
||||
default:
|
||||
//capture any other object that might have a mesh representation
|
||||
if (@object["displayMesh"] is Mesh)
|
||||
return MeshToNative(@object["displayMesh"] as Mesh);
|
||||
throw new NotSupportedException();
|
||||
}
|
||||
}
|
||||
|
||||
public List<Base> ConvertToSpeckle(List<object> objects)
|
||||
{
|
||||
return objects.Select(x => ConvertToSpeckle(x)).ToList();
|
||||
}
|
||||
|
||||
public List<object> ConvertToNative(List<Base> objects)
|
||||
{
|
||||
return objects.Select(x => ConvertToNative(x)).ToList();
|
||||
;
|
||||
}
|
||||
|
||||
public bool CanConvertToSpeckle(object @object)
|
||||
{
|
||||
switch (@object)
|
||||
{
|
||||
case GameObject o:
|
||||
return o.GetComponent<MeshFilter>() != null;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public bool CanConvertToNative(Base @object)
|
||||
{
|
||||
switch (@object)
|
||||
{
|
||||
// case Point _:
|
||||
// return true;
|
||||
// case Line _:
|
||||
// return true;
|
||||
// case Polyline _:
|
||||
// return true;
|
||||
// case Curve _:
|
||||
// return true;
|
||||
// case View3D _:
|
||||
// return true;
|
||||
// case View2D _:
|
||||
// return false;
|
||||
case IDisplayMesh _:
|
||||
return true;
|
||||
case Mesh _:
|
||||
return true;
|
||||
default:
|
||||
return @object["displayMesh"] is Mesh;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion implemented methods
|
||||
}
|
||||
}
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,33 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 17512a3c0f40afa4c8dfcc7e01f5d966
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 0
|
||||
isOverridable: 0
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 1
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
- first:
|
||||
Windows Store Apps: WindowsStoreApps
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: AnyCPU
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
@@ -1,33 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1cf9bfa3fa391d44fbad15257fcf8188
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 0
|
||||
isOverridable: 0
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 1
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
- first:
|
||||
Windows Store Apps: WindowsStoreApps
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: AnyCPU
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
@@ -1,33 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e04acff695d6dfc4c8172d263c148366
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 0
|
||||
isOverridable: 0
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 1
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
- first:
|
||||
Windows Store Apps: WindowsStoreApps
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: AnyCPU
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
@@ -1,33 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 95c269842f6915a4cb61a32d2e4fa9e8
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 0
|
||||
isOverridable: 0
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 1
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
- first:
|
||||
Windows Store Apps: WindowsStoreApps
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: AnyCPU
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,455 +0,0 @@
|
||||
{
|
||||
"runtimeTarget": {
|
||||
"name": ".NETStandard,Version=v2.0/",
|
||||
"signature": ""
|
||||
},
|
||||
"compilationOptions": {},
|
||||
"targets": {
|
||||
".NETStandard,Version=v2.0": {},
|
||||
".NETStandard,Version=v2.0/": {
|
||||
"SpeckleCore2/2.1.0": {
|
||||
"dependencies": {
|
||||
"GraphQL.Client": "3.2.2",
|
||||
"Microsoft.CSharp": "4.7.0",
|
||||
"NETStandard.Library": "2.0.3",
|
||||
"Piwik.Tracker": "3.0.0",
|
||||
"Sentry": "3.2.0",
|
||||
"Speckle.Newtonsoft.Json": "12.0.3.1",
|
||||
"System.Data.SQLite.Core": "1.0.113.7"
|
||||
},
|
||||
"runtime": {
|
||||
"SpeckleCore2.dll": {}
|
||||
}
|
||||
},
|
||||
"GraphQL.Client/3.2.2": {
|
||||
"dependencies": {
|
||||
"GraphQL.Client.Abstractions": "3.2.2",
|
||||
"GraphQL.Client.Abstractions.Websocket": "3.2.2"
|
||||
},
|
||||
"runtime": {
|
||||
"lib/netstandard2.0/GraphQL.Client.dll": {
|
||||
"assemblyVersion": "3.2.2.0",
|
||||
"fileVersion": "3.2.2.0"
|
||||
}
|
||||
}
|
||||
},
|
||||
"GraphQL.Client.Abstractions/3.2.2": {
|
||||
"dependencies": {
|
||||
"GraphQL.Primitives": "3.2.2",
|
||||
"System.Reactive": "4.3.2"
|
||||
},
|
||||
"runtime": {
|
||||
"lib/netstandard2.0/GraphQL.Client.Abstractions.dll": {
|
||||
"assemblyVersion": "3.2.2.0",
|
||||
"fileVersion": "3.2.2.0"
|
||||
}
|
||||
}
|
||||
},
|
||||
"GraphQL.Client.Abstractions.Websocket/3.2.2": {
|
||||
"dependencies": {
|
||||
"GraphQL.Client.Abstractions": "3.2.2"
|
||||
},
|
||||
"runtime": {
|
||||
"lib/netstandard2.0/GraphQL.Client.Abstractions.Websocket.dll": {
|
||||
"assemblyVersion": "3.2.2.0",
|
||||
"fileVersion": "3.2.2.0"
|
||||
}
|
||||
}
|
||||
},
|
||||
"GraphQL.Primitives/3.2.2": {
|
||||
"runtime": {
|
||||
"lib/netstandard2.0/GraphQL.Primitives.dll": {
|
||||
"assemblyVersion": "3.2.2.0",
|
||||
"fileVersion": "3.2.2.0"
|
||||
}
|
||||
}
|
||||
},
|
||||
"Microsoft.Bcl.AsyncInterfaces/5.0.0": {
|
||||
"dependencies": {
|
||||
"System.Threading.Tasks.Extensions": "4.5.4"
|
||||
},
|
||||
"runtime": {
|
||||
"lib/netstandard2.0/Microsoft.Bcl.AsyncInterfaces.dll": {
|
||||
"assemblyVersion": "5.0.0.0",
|
||||
"fileVersion": "5.0.20.51904"
|
||||
}
|
||||
}
|
||||
},
|
||||
"Microsoft.CSharp/4.7.0": {
|
||||
"runtime": {
|
||||
"lib/netstandard2.0/Microsoft.CSharp.dll": {
|
||||
"assemblyVersion": "4.0.5.0",
|
||||
"fileVersion": "4.700.19.56404"
|
||||
}
|
||||
}
|
||||
},
|
||||
"Microsoft.NETCore.Platforms/1.1.0": {},
|
||||
"Microsoft.NETCore.Targets/1.1.0": {},
|
||||
"NETStandard.Library/2.0.3": {
|
||||
"dependencies": {
|
||||
"Microsoft.NETCore.Platforms": "1.1.0"
|
||||
}
|
||||
},
|
||||
"Piwik.Tracker/3.0.0": {
|
||||
"runtime": {
|
||||
"lib/net40/Piwik.Tracker.dll": {
|
||||
"assemblyVersion": "3.0.0.0",
|
||||
"fileVersion": "3.0.0.0"
|
||||
}
|
||||
}
|
||||
},
|
||||
"Sentry/3.2.0": {
|
||||
"dependencies": {
|
||||
"Microsoft.Bcl.AsyncInterfaces": "5.0.0",
|
||||
"System.Buffers": "4.5.1",
|
||||
"System.Reflection.Metadata": "5.0.0",
|
||||
"System.Text.Json": "5.0.0",
|
||||
"System.Threading.Tasks.Extensions": "4.5.4"
|
||||
},
|
||||
"runtime": {
|
||||
"lib/netstandard2.0/Sentry.dll": {
|
||||
"assemblyVersion": "3.2.0.0",
|
||||
"fileVersion": "3.2.0.0"
|
||||
}
|
||||
}
|
||||
},
|
||||
"Speckle.Newtonsoft.Json/12.0.3.1": {
|
||||
"runtime": {
|
||||
"lib/netstandard2.0/Speckle.Newtonsoft.Json.dll": {
|
||||
"assemblyVersion": "12.0.3.0",
|
||||
"fileVersion": "11.0.1.0"
|
||||
}
|
||||
}
|
||||
},
|
||||
"Stub.System.Data.SQLite.Core.NetStandard/1.0.113.2": {
|
||||
"runtime": {
|
||||
"lib/netstandard2.0/System.Data.SQLite.dll": {
|
||||
"assemblyVersion": "1.0.113.0",
|
||||
"fileVersion": "1.0.113.0"
|
||||
}
|
||||
}
|
||||
},
|
||||
"System.Buffers/4.5.1": {
|
||||
"runtime": {
|
||||
"lib/netstandard2.0/System.Buffers.dll": {
|
||||
"assemblyVersion": "4.0.3.0",
|
||||
"fileVersion": "4.6.28619.1"
|
||||
}
|
||||
}
|
||||
},
|
||||
"System.Collections.Immutable/5.0.0": {
|
||||
"dependencies": {
|
||||
"System.Memory": "4.5.4"
|
||||
},
|
||||
"runtime": {
|
||||
"lib/netstandard2.0/System.Collections.Immutable.dll": {
|
||||
"assemblyVersion": "5.0.0.0",
|
||||
"fileVersion": "5.0.20.51904"
|
||||
}
|
||||
}
|
||||
},
|
||||
"System.Data.SQLite.Core/1.0.113.7": {
|
||||
"dependencies": {
|
||||
"Stub.System.Data.SQLite.Core.NetStandard": "1.0.113.2"
|
||||
}
|
||||
},
|
||||
"System.Memory/4.5.4": {
|
||||
"dependencies": {
|
||||
"System.Buffers": "4.5.1",
|
||||
"System.Numerics.Vectors": "4.5.0",
|
||||
"System.Runtime.CompilerServices.Unsafe": "5.0.0"
|
||||
},
|
||||
"runtime": {
|
||||
"lib/netstandard2.0/System.Memory.dll": {
|
||||
"assemblyVersion": "4.0.1.1",
|
||||
"fileVersion": "4.6.28619.1"
|
||||
}
|
||||
}
|
||||
},
|
||||
"System.Numerics.Vectors/4.5.0": {
|
||||
"runtime": {
|
||||
"lib/netstandard2.0/System.Numerics.Vectors.dll": {
|
||||
"assemblyVersion": "4.1.4.0",
|
||||
"fileVersion": "4.6.26515.6"
|
||||
}
|
||||
}
|
||||
},
|
||||
"System.Reactive/4.3.2": {
|
||||
"dependencies": {
|
||||
"System.Runtime.InteropServices.WindowsRuntime": "4.3.0",
|
||||
"System.Threading.Tasks.Extensions": "4.5.4"
|
||||
},
|
||||
"runtime": {
|
||||
"lib/netstandard2.0/System.Reactive.dll": {
|
||||
"assemblyVersion": "4.3.0.0",
|
||||
"fileVersion": "4.3.2.55399"
|
||||
}
|
||||
}
|
||||
},
|
||||
"System.Reflection.Metadata/5.0.0": {
|
||||
"dependencies": {
|
||||
"System.Collections.Immutable": "5.0.0"
|
||||
},
|
||||
"runtime": {
|
||||
"lib/netstandard2.0/System.Reflection.Metadata.dll": {
|
||||
"assemblyVersion": "5.0.0.0",
|
||||
"fileVersion": "5.0.20.51904"
|
||||
}
|
||||
}
|
||||
},
|
||||
"System.Runtime/4.3.0": {
|
||||
"dependencies": {
|
||||
"Microsoft.NETCore.Platforms": "1.1.0",
|
||||
"Microsoft.NETCore.Targets": "1.1.0"
|
||||
}
|
||||
},
|
||||
"System.Runtime.CompilerServices.Unsafe/5.0.0": {
|
||||
"runtime": {
|
||||
"lib/netstandard2.0/System.Runtime.CompilerServices.Unsafe.dll": {
|
||||
"assemblyVersion": "5.0.0.0",
|
||||
"fileVersion": "5.0.20.51904"
|
||||
}
|
||||
}
|
||||
},
|
||||
"System.Runtime.InteropServices.WindowsRuntime/4.3.0": {
|
||||
"dependencies": {
|
||||
"System.Runtime": "4.3.0"
|
||||
},
|
||||
"runtime": {
|
||||
"lib/netstandard1.3/System.Runtime.InteropServices.WindowsRuntime.dll": {
|
||||
"assemblyVersion": "4.0.2.0",
|
||||
"fileVersion": "4.6.24705.1"
|
||||
}
|
||||
}
|
||||
},
|
||||
"System.Text.Encodings.Web/5.0.0": {
|
||||
"dependencies": {
|
||||
"System.Memory": "4.5.4"
|
||||
},
|
||||
"runtime": {
|
||||
"lib/netstandard2.0/System.Text.Encodings.Web.dll": {
|
||||
"assemblyVersion": "5.0.0.0",
|
||||
"fileVersion": "5.0.20.51904"
|
||||
}
|
||||
}
|
||||
},
|
||||
"System.Text.Json/5.0.0": {
|
||||
"dependencies": {
|
||||
"Microsoft.Bcl.AsyncInterfaces": "5.0.0",
|
||||
"System.Buffers": "4.5.1",
|
||||
"System.Memory": "4.5.4",
|
||||
"System.Numerics.Vectors": "4.5.0",
|
||||
"System.Runtime.CompilerServices.Unsafe": "5.0.0",
|
||||
"System.Text.Encodings.Web": "5.0.0",
|
||||
"System.Threading.Tasks.Extensions": "4.5.4"
|
||||
},
|
||||
"runtime": {
|
||||
"lib/netstandard2.0/System.Text.Json.dll": {
|
||||
"assemblyVersion": "5.0.0.0",
|
||||
"fileVersion": "5.0.20.51904"
|
||||
}
|
||||
}
|
||||
},
|
||||
"System.Threading.Tasks.Extensions/4.5.4": {
|
||||
"dependencies": {
|
||||
"System.Runtime.CompilerServices.Unsafe": "5.0.0"
|
||||
},
|
||||
"runtime": {
|
||||
"lib/netstandard2.0/System.Threading.Tasks.Extensions.dll": {
|
||||
"assemblyVersion": "4.2.0.1",
|
||||
"fileVersion": "4.6.28619.1"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"libraries": {
|
||||
"SpeckleCore2/2.1.0": {
|
||||
"type": "project",
|
||||
"serviceable": false,
|
||||
"sha512": ""
|
||||
},
|
||||
"GraphQL.Client/3.2.2": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-CgopiGmBLs95hQrxL3FG8EOJlKiF4CU9fLdELRIgk1GagaN9mxluyErLzZfT7a6Z/26vxHYCDfnL/UZgmjxOKw==",
|
||||
"path": "graphql.client/3.2.2",
|
||||
"hashPath": "graphql.client.3.2.2.nupkg.sha512"
|
||||
},
|
||||
"GraphQL.Client.Abstractions/3.2.2": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-fWwx/5K15BGFi6p7+kZ32fYlOPv50Sb6ta7XpAUeh9vfYjZWU+BxL9ydKRgBrj2owpx6MSV0mfrSPalMO/LeAg==",
|
||||
"path": "graphql.client.abstractions/3.2.2",
|
||||
"hashPath": "graphql.client.abstractions.3.2.2.nupkg.sha512"
|
||||
},
|
||||
"GraphQL.Client.Abstractions.Websocket/3.2.2": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-YdTEpy0WohAmvsu6tdHkSkh9CaWHz5NIcrZtU0O4eCD58eG0A8O6o72FoK75uxArDg8YyqxlJ8AA6LoNJIxMNg==",
|
||||
"path": "graphql.client.abstractions.websocket/3.2.2",
|
||||
"hashPath": "graphql.client.abstractions.websocket.3.2.2.nupkg.sha512"
|
||||
},
|
||||
"GraphQL.Primitives/3.2.2": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-JWurQzJ39/agJqrLIcRgnTtzCgn3zlGmrrYH4qznHUEq49QIMM+btTGbsE9pXmVKIk4Kl0SrDag+Y9ev8zBoXw==",
|
||||
"path": "graphql.primitives/3.2.2",
|
||||
"hashPath": "graphql.primitives.3.2.2.nupkg.sha512"
|
||||
},
|
||||
"Microsoft.Bcl.AsyncInterfaces/5.0.0": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-W8DPQjkMScOMTtJbPwmPyj9c3zYSFGawDW3jwlBOOsnY+EzZFLgNQ/UMkK35JmkNOVPdCyPr2Tw7Vv9N+KA3ZQ==",
|
||||
"path": "microsoft.bcl.asyncinterfaces/5.0.0",
|
||||
"hashPath": "microsoft.bcl.asyncinterfaces.5.0.0.nupkg.sha512"
|
||||
},
|
||||
"Microsoft.CSharp/4.7.0": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-pTj+D3uJWyN3My70i2Hqo+OXixq3Os2D1nJ2x92FFo6sk8fYS1m1WLNTs0Dc1uPaViH0YvEEwvzddQ7y4rhXmA==",
|
||||
"path": "microsoft.csharp/4.7.0",
|
||||
"hashPath": "microsoft.csharp.4.7.0.nupkg.sha512"
|
||||
},
|
||||
"Microsoft.NETCore.Platforms/1.1.0": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-kz0PEW2lhqygehI/d6XsPCQzD7ff7gUJaVGPVETX611eadGsA3A877GdSlU0LRVMCTH/+P3o2iDTak+S08V2+A==",
|
||||
"path": "microsoft.netcore.platforms/1.1.0",
|
||||
"hashPath": "microsoft.netcore.platforms.1.1.0.nupkg.sha512"
|
||||
},
|
||||
"Microsoft.NETCore.Targets/1.1.0": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-aOZA3BWfz9RXjpzt0sRJJMjAscAUm3Hoa4UWAfceV9UTYxgwZ1lZt5nO2myFf+/jetYQo4uTP7zS8sJY67BBxg==",
|
||||
"path": "microsoft.netcore.targets/1.1.0",
|
||||
"hashPath": "microsoft.netcore.targets.1.1.0.nupkg.sha512"
|
||||
},
|
||||
"NETStandard.Library/2.0.3": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-st47PosZSHrjECdjeIzZQbzivYBJFv6P2nv4cj2ypdI204DO+vZ7l5raGMiX4eXMJ53RfOIg+/s4DHVZ54Nu2A==",
|
||||
"path": "netstandard.library/2.0.3",
|
||||
"hashPath": "netstandard.library.2.0.3.nupkg.sha512"
|
||||
},
|
||||
"Piwik.Tracker/3.0.0": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-91mJZeyxFUhA9t2oFTVw+W7p9t7+oZ1KAPfvGUvAkX2m/74xDlPsp8qfs4UIW9XE+TrU7PCBn43QPh0rP9jeOA==",
|
||||
"path": "piwik.tracker/3.0.0",
|
||||
"hashPath": "piwik.tracker.3.0.0.nupkg.sha512"
|
||||
},
|
||||
"Sentry/3.2.0": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-nCKeGuy8JCofqM44+ThKXnjKU7A00mQCHrPbChEh50l+WcSJW1bV+pQDblWhQis37+cP3sV6q0QApDEK4Qy4Zw==",
|
||||
"path": "sentry/3.2.0",
|
||||
"hashPath": "sentry.3.2.0.nupkg.sha512"
|
||||
},
|
||||
"Speckle.Newtonsoft.Json/12.0.3.1": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-yM+DdKzI++HY4FYbloGcPGQ0yrfSv5/a5Rd+iYuzj47ATRtb2M5oCEVcxM4Xum5EDq0BMwkIY/cw/DMlRrZFDA==",
|
||||
"path": "speckle.newtonsoft.json/12.0.3.1",
|
||||
"hashPath": "speckle.newtonsoft.json.12.0.3.1.nupkg.sha512"
|
||||
},
|
||||
"Stub.System.Data.SQLite.Core.NetStandard/1.0.113.2": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-yGIM9xFyPHl79HluNTSQarvAOIJ68pmzmlMayVN6Nivu/7TiaHt7WqptolvwmuKdAXei8OzENh9RNdh7d6evjQ==",
|
||||
"path": "stub.system.data.sqlite.core.netstandard/1.0.113.2",
|
||||
"hashPath": "stub.system.data.sqlite.core.netstandard.1.0.113.2.nupkg.sha512"
|
||||
},
|
||||
"System.Buffers/4.5.1": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-Rw7ijyl1qqRS0YQD/WycNst8hUUMgrMH4FCn1nNm27M4VxchZ1js3fVjQaANHO5f3sN4isvP4a+Met9Y4YomAg==",
|
||||
"path": "system.buffers/4.5.1",
|
||||
"hashPath": "system.buffers.4.5.1.nupkg.sha512"
|
||||
},
|
||||
"System.Collections.Immutable/5.0.0": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-FXkLXiK0sVVewcso0imKQoOxjoPAj42R8HtjjbSjVPAzwDfzoyoznWxgA3c38LDbN9SJux1xXoXYAhz98j7r2g==",
|
||||
"path": "system.collections.immutable/5.0.0",
|
||||
"hashPath": "system.collections.immutable.5.0.0.nupkg.sha512"
|
||||
},
|
||||
"System.Data.SQLite.Core/1.0.113.7": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-2DKMIxfZpIVzdMfx1dj9qvTm+0m0Mx6sN6CZXMQDNytU7Sk/JKo0Ox6mvHAicfHrQgqZbUZMzMMtLXD0kwmFfg==",
|
||||
"path": "system.data.sqlite.core/1.0.113.7",
|
||||
"hashPath": "system.data.sqlite.core.1.0.113.7.nupkg.sha512"
|
||||
},
|
||||
"System.Memory/4.5.4": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-1MbJTHS1lZ4bS4FmsJjnuGJOu88ZzTT2rLvrhW7Ygic+pC0NWA+3hgAen0HRdsocuQXCkUTdFn9yHJJhsijDXw==",
|
||||
"path": "system.memory/4.5.4",
|
||||
"hashPath": "system.memory.4.5.4.nupkg.sha512"
|
||||
},
|
||||
"System.Numerics.Vectors/4.5.0": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-QQTlPTl06J/iiDbJCiepZ4H//BVraReU4O4EoRw1U02H5TLUIT7xn3GnDp9AXPSlJUDyFs4uWjWafNX6WrAojQ==",
|
||||
"path": "system.numerics.vectors/4.5.0",
|
||||
"hashPath": "system.numerics.vectors.4.5.0.nupkg.sha512"
|
||||
},
|
||||
"System.Reactive/4.3.2": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-WhGkScPWxw2pp7UwRW8M1OvYZ3WUDPC2wJ0aiuaB4KRD3bt4wLkgHgYnOUu87WRhsurvv5LN0E63iWOEza2o8g==",
|
||||
"path": "system.reactive/4.3.2",
|
||||
"hashPath": "system.reactive.4.3.2.nupkg.sha512"
|
||||
},
|
||||
"System.Reflection.Metadata/5.0.0": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-5NecZgXktdGg34rh1OenY1rFNDCI8xSjFr+Z4OU4cU06AQHUdRnIIEeWENu3Wl4YowbzkymAIMvi3WyK9U53pQ==",
|
||||
"path": "system.reflection.metadata/5.0.0",
|
||||
"hashPath": "system.reflection.metadata.5.0.0.nupkg.sha512"
|
||||
},
|
||||
"System.Runtime/4.3.0": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-JufQi0vPQ0xGnAczR13AUFglDyVYt4Kqnz1AZaiKZ5+GICq0/1MH/mO/eAJHt/mHW1zjKBJd7kV26SrxddAhiw==",
|
||||
"path": "system.runtime/4.3.0",
|
||||
"hashPath": "system.runtime.4.3.0.nupkg.sha512"
|
||||
},
|
||||
"System.Runtime.CompilerServices.Unsafe/5.0.0": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-ZD9TMpsmYJLrxbbmdvhwt9YEgG5WntEnZ/d1eH8JBX9LBp+Ju8BSBhUGbZMNVHHomWo2KVImJhTDl2hIgw/6MA==",
|
||||
"path": "system.runtime.compilerservices.unsafe/5.0.0",
|
||||
"hashPath": "system.runtime.compilerservices.unsafe.5.0.0.nupkg.sha512"
|
||||
},
|
||||
"System.Runtime.InteropServices.WindowsRuntime/4.3.0": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-J4GUi3xZQLUBasNwZnjrffN8i5wpHrBtZoLG+OhRyGo/+YunMRWWtwoMDlUAIdmX0uRfpHIBDSV6zyr3yf00TA==",
|
||||
"path": "system.runtime.interopservices.windowsruntime/4.3.0",
|
||||
"hashPath": "system.runtime.interopservices.windowsruntime.4.3.0.nupkg.sha512"
|
||||
},
|
||||
"System.Text.Encodings.Web/5.0.0": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-EEslUvHKll1ftizbn20mX3Ix/l4Ygk/bdJ2LY6/X6FlGaP0RIhKMo9nS6JIGnKKT6KBP2PGj6JC3B9/ZF6ErqQ==",
|
||||
"path": "system.text.encodings.web/5.0.0",
|
||||
"hashPath": "system.text.encodings.web.5.0.0.nupkg.sha512"
|
||||
},
|
||||
"System.Text.Json/5.0.0": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-+luxMQNZ2WqeffBU7Ml6njIvxc8169NW2oU+ygNudXQGZiarjE7DOtN7bILiQjTZjkmwwRZGTtLzmdrSI/Ustw==",
|
||||
"path": "system.text.json/5.0.0",
|
||||
"hashPath": "system.text.json.5.0.0.nupkg.sha512"
|
||||
},
|
||||
"System.Threading.Tasks.Extensions/4.5.4": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-zteT+G8xuGu6mS+mzDzYXbzS7rd3K6Fjb9RiZlYlJPam2/hU7JCBZBVEcywNuR+oZ1ncTvc/cq0faRr3P01OVg==",
|
||||
"path": "system.threading.tasks.extensions/4.5.4",
|
||||
"hashPath": "system.threading.tasks.extensions.4.5.4.nupkg.sha512"
|
||||
}
|
||||
}
|
||||
}
|
||||
Binary file not shown.
@@ -1,33 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: fde0b3ed1afd33749a8675e312c704fc
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 0
|
||||
isOverridable: 0
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 1
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
- first:
|
||||
Windows Store Apps: WindowsStoreApps
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: AnyCPU
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
@@ -1,33 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a403e5b8a63ba334983c3f7811d22de6
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 0
|
||||
isOverridable: 0
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 1
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
- first:
|
||||
Windows Store Apps: WindowsStoreApps
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: AnyCPU
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
@@ -1,33 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a89f3d8ae2ec3394784109af592b902d
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 0
|
||||
isOverridable: 0
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 1
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
- first:
|
||||
Windows Store Apps: WindowsStoreApps
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: AnyCPU
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,33 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e401bf217545e9d4c9d29f56d85c201b
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 0
|
||||
isOverridable: 0
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 1
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
- first:
|
||||
Windows Store Apps: WindowsStoreApps
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: AnyCPU
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
Binary file not shown.
@@ -1,33 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4dd0f68e5983fb04a9b06609712cc4e4
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 0
|
||||
isOverridable: 0
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 1
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
- first:
|
||||
Windows Store Apps: WindowsStoreApps
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: AnyCPU
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
@@ -1,27 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 56f71e71972277846b26b62341a29c20
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 0
|
||||
isOverridable: 0
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 1
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,146 +0,0 @@
|
||||
/*
|
||||
Copyright 2015 Pim de Witte All Rights Reserved.
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Threading.Tasks;
|
||||
using Speckle.Core.Kits;
|
||||
using Speckle.Core.Logging;
|
||||
using Unity.EditorCoroutines.Editor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Speckle.ConnectorUnity {
|
||||
/// Author: Pim de Witte (pimdewitte.com) and contributors, https://github.com/PimDeWitte/UnityMainThreadDispatcher
|
||||
/// <summary>
|
||||
/// A thread-safe class which holds a queue with actions to execute on the next Update() method. It can be used to make calls to the main thread for
|
||||
/// things such as UI Manipulation in Unity. It was developed for use in combination with the Firebase Unity plugin, which uses separate threads for event handling
|
||||
/// </summary>
|
||||
///
|
||||
[ExecuteAlways]
|
||||
public class Dispatcher : MonoBehaviour {
|
||||
|
||||
private static readonly Queue<Action> _executionQueue = new Queue<Action>( );
|
||||
|
||||
private static Dispatcher _instance;
|
||||
|
||||
EditorCoroutine m_LoggerCoroutine;
|
||||
|
||||
public static bool Ownerless { get; set; }
|
||||
|
||||
public static Dispatcher Instance { get; set; }
|
||||
// public static Dispatcher Instance {
|
||||
// get {
|
||||
// if ( _instance == null )
|
||||
// throw new Exception( "Could not find the Dispatcher object. Please ensure you have added a Dispatcher object with this script to your scene." );
|
||||
//
|
||||
// return _instance;
|
||||
// }
|
||||
// set => _instance = value;
|
||||
// }
|
||||
|
||||
private void OnEnable( )
|
||||
{
|
||||
Instance = this;
|
||||
}
|
||||
|
||||
void Awake( )
|
||||
{
|
||||
Instance = this;
|
||||
Setup.Init( Applications.Unity );
|
||||
|
||||
if ( _instance == null ) {
|
||||
_instance = this;
|
||||
if ( Application.isPlaying )
|
||||
DontDestroyOnLoad( this.gameObject );
|
||||
}
|
||||
}
|
||||
|
||||
void OnDestroy( )
|
||||
{
|
||||
_instance = null;
|
||||
}
|
||||
|
||||
public void Update( )
|
||||
{
|
||||
lock ( _executionQueue ) {
|
||||
while ( _executionQueue.Count > 0 ) {
|
||||
_executionQueue.Dequeue( ).Invoke( );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Locks the queue and adds the IEnumerator to the queue
|
||||
/// </summary>
|
||||
/// <param name="action">IEnumerator function that will be executed from the main thread.</param>
|
||||
public void Enqueue( IEnumerator action )
|
||||
{
|
||||
lock ( _executionQueue ) {
|
||||
if ( Application.isEditor ) {
|
||||
Debug.Log( "Calling from Editor" );
|
||||
_executionQueue.Enqueue( ( ) => {
|
||||
if ( Ownerless )
|
||||
EditorCoroutineUtility.StartCoroutineOwnerless( action );
|
||||
else
|
||||
EditorCoroutineUtility.StartCoroutine( action, this );
|
||||
} );
|
||||
} else {
|
||||
Debug.Log( "Calling from Play" );
|
||||
_executionQueue.Enqueue( ( ) => { StartCoroutine( action ); } );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Locks the queue and adds the Action to the queue
|
||||
/// </summary>
|
||||
/// <param name="action">function that will be executed from the main thread.</param>
|
||||
public void Enqueue( Action action )
|
||||
{
|
||||
Enqueue( ActionWrapper( action ) );
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Locks the queue and adds the Action to the queue, returning a Task which is completed when the action completes
|
||||
/// </summary>
|
||||
/// <param name="action">function that will be executed from the main thread.</param>
|
||||
/// <returns>A Task that can be awaited until the action completes</returns>
|
||||
public Task EnqueueAsync( Action action )
|
||||
{
|
||||
var tcs = new TaskCompletionSource<bool>( );
|
||||
|
||||
void WrappedAction( )
|
||||
{
|
||||
try {
|
||||
action( );
|
||||
tcs.TrySetResult( true );
|
||||
}
|
||||
catch ( Exception ex ) {
|
||||
tcs.TrySetException( ex );
|
||||
}
|
||||
}
|
||||
|
||||
Enqueue( ActionWrapper( WrappedAction ) );
|
||||
return tcs.Task;
|
||||
}
|
||||
|
||||
IEnumerator ActionWrapper( Action a )
|
||||
{
|
||||
a( );
|
||||
yield return null;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Binary file not shown.
@@ -1,308 +0,0 @@
|
||||
using Objects.Converter.Unity;
|
||||
using Speckle.Core.Api;
|
||||
using Speckle.Core.Api.SubscriptionModels;
|
||||
using Speckle.Core.Credentials;
|
||||
using Speckle.Core.Logging;
|
||||
using Speckle.Core.Models;
|
||||
using Speckle.Core.Transports;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Concurrent;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Sentry;
|
||||
using Sentry.Protocol;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Speckle.ConnectorUnity {
|
||||
/// <summary>
|
||||
/// A Speckle Receiver, it's a wrapper around a basic Speckle Client
|
||||
/// that handles conversions and subscriptions for you
|
||||
/// </summary>
|
||||
[ExecuteAlways]
|
||||
public class Receiver : MonoBehaviour {
|
||||
|
||||
public string StreamId;
|
||||
public string BranchName = "main";
|
||||
public Stream Stream;
|
||||
public int TotalChildrenCount = 0;
|
||||
public GameObject ReceivedData;
|
||||
|
||||
private bool AutoReceive;
|
||||
private bool DeleteOld;
|
||||
public Action ReceiveCompleteAction;
|
||||
|
||||
private Action<ConcurrentDictionary<string, int>> OnProgressAction;
|
||||
private Action<string, Exception> OnErrorAction;
|
||||
private Action<int> OnTotalChildrenCountKnown;
|
||||
private Action<GameObject> OnDataReceivedAction;
|
||||
|
||||
|
||||
private ConverterUnity _converter = new ConverterUnity( );
|
||||
private Client Client { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Initializes the Receiver manually
|
||||
/// </summary>
|
||||
/// <param name="streamId">Id of the stream to receive</param>
|
||||
/// <param name="autoReceive">If true, it will automatically receive updates sent to this stream</param>
|
||||
/// <param name="deleteOld">If true, it will delete previously received objects when new one are received</param>
|
||||
/// <param name="account">Account to use, if null the default account will be used</param>
|
||||
/// <param name="onDataReceivedAction">Action to run after new data has been received and converted</param>
|
||||
/// <param name="onProgressAction">Action to run when there is download/conversion progress</param>
|
||||
/// <param name="onErrorAction">Action to run on error</param>
|
||||
/// <param name="onTotalChildrenCountKnown">Action to run when the TotalChildrenCount is known</param>
|
||||
public void Init( string streamId, bool autoReceive = false, bool deleteOld = true, Account account = null,
|
||||
Action<GameObject> onDataReceivedAction = null, Action<ConcurrentDictionary<string, int>> onProgressAction = null,
|
||||
Action<string, Exception> onErrorAction = null, Action<int> onTotalChildrenCountKnown = null )
|
||||
{
|
||||
StreamId = streamId;
|
||||
AutoReceive = autoReceive;
|
||||
DeleteOld = deleteOld;
|
||||
OnDataReceivedAction = onDataReceivedAction;
|
||||
OnErrorAction = onErrorAction;
|
||||
OnProgressAction = onProgressAction;
|
||||
OnTotalChildrenCountKnown = onTotalChildrenCountKnown;
|
||||
|
||||
Client = new Client( account ?? AccountManager.GetDefaultAccount( ) );
|
||||
|
||||
//using the ApplicationPlaceholderObject to pass materials
|
||||
//available in Assets/Materials to the converters
|
||||
var materials = Resources.LoadAll( "Materials", typeof( Material ) ).Cast<Material>( )
|
||||
.Select( x => new ApplicationPlaceholderObject {NativeObject = x} ).ToList( );
|
||||
_converter.SetContextObjects( materials );
|
||||
|
||||
if ( AutoReceive ) {
|
||||
Client.SubscribeCommitCreated( StreamId );
|
||||
Client.OnCommitCreated += Client_OnCommitCreated;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets and converts the data of the last commit on the Stream
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public void Receive( string branchName = "" )
|
||||
{
|
||||
if ( Client == null || string.IsNullOrEmpty( StreamId ) )
|
||||
throw new Exception( "Receiver has not been initialized. Please call Init()." );
|
||||
|
||||
if ( !string.IsNullOrEmpty( branchName ) )
|
||||
BranchName = branchName;
|
||||
|
||||
Task.Run( async ( ) => {
|
||||
try {
|
||||
Debug.Log( $"Trying for Branch: {BranchName} on Stream: {StreamId} " );
|
||||
var mainBranch = await Client.BranchGet( StreamId, BranchName, 1 );
|
||||
|
||||
if ( !mainBranch.commits.items.Any( ) )
|
||||
throw new Exception( "This branch has no commits" );
|
||||
|
||||
var commit = mainBranch.commits.items[ 0 ];
|
||||
// TODO send info for what objects are being converted
|
||||
GetAndConvertObject( commit.referencedObject, commit.id );
|
||||
}
|
||||
catch ( Exception e ) {
|
||||
throw new SpeckleException( e.Message, e, true, SentryLevel.Error );
|
||||
}
|
||||
} );
|
||||
}
|
||||
|
||||
#region private methods
|
||||
/// <summary>
|
||||
/// Fired when a new commit is created on this stream
|
||||
/// It receives and converts the objects and then executes the user defined _onCommitCreated action.
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected virtual void Client_OnCommitCreated( object sender, CommitInfo e )
|
||||
{
|
||||
if ( e.branchName == BranchName ) {
|
||||
Debug.Log( "New commit created" );
|
||||
GetAndConvertObject( e.objectId, e.id );
|
||||
}
|
||||
}
|
||||
|
||||
private async void GetAndConvertObject( string objectId, string commitId )
|
||||
{
|
||||
Debug.Log( "Converting new objects" );
|
||||
try {
|
||||
Tracker.TrackPageview( Tracker.RECEIVE );
|
||||
|
||||
var transport = new ServerTransport( Client.Account, StreamId );
|
||||
var @base = await Operations.Receive(
|
||||
objectId,
|
||||
remoteTransport: transport,
|
||||
onErrorAction: OnErrorAction,
|
||||
onProgressAction: OnProgressAction,
|
||||
onTotalChildrenCountKnown: OnTotalChildrenCountKnown
|
||||
);
|
||||
|
||||
Dispatcher.Instance.Enqueue( ( ) => {
|
||||
var go = ConvertRecursivelyToNative( @base, commitId );
|
||||
//remove previously received object
|
||||
if ( DeleteOld && ReceivedData != null ) {
|
||||
if ( Application.isPlaying )
|
||||
Destroy( ReceivedData );
|
||||
else {
|
||||
DestroyImmediate( ReceivedData );
|
||||
}
|
||||
}
|
||||
ReceivedData = go;
|
||||
OnDataReceivedAction?.Invoke( go );
|
||||
} );
|
||||
Debug.Log( "Try State Done" );
|
||||
ReceiveCompleteAction?.Invoke( );
|
||||
|
||||
}
|
||||
catch ( Exception e ) {
|
||||
throw new SpeckleException( e.Message, e, true, SentryLevel.Error );
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Converts a Base object to a GameObject Recursively
|
||||
/// </summary>
|
||||
/// <param name="base"></param>
|
||||
/// <returns></returns>
|
||||
private GameObject ConvertRecursivelyToNative( Base @base, string name )
|
||||
{
|
||||
// case 1: it's an item that has a direct conversion method, eg a point
|
||||
if ( _converter.CanConvertToNative( @base ) ) {
|
||||
var go = TryConvertItemToNative( @base );
|
||||
return go;
|
||||
}
|
||||
|
||||
// case 2: it's a wrapper Base
|
||||
// 2a: if there's only one member unpack it
|
||||
// 2b: otherwise return dictionary of unpacked members
|
||||
var members = @base.GetMemberNames( ).ToList( );
|
||||
if ( members.Count( ) == 1 ) {
|
||||
var go = RecurseTreeToNative( @base[ members.First( ) ] );
|
||||
go.name = members.First( );
|
||||
return go;
|
||||
} else {
|
||||
//empty game object with the commit id as name, used to contain all the rest
|
||||
var go = new GameObject {name = name};
|
||||
foreach ( var member in members ) {
|
||||
var goo = RecurseTreeToNative( @base[ member ] );
|
||||
if ( goo != null ) {
|
||||
goo.name = member;
|
||||
goo.transform.parent = go.transform;
|
||||
}
|
||||
}
|
||||
|
||||
return go;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Converts an object recursively to a list of GameObjects
|
||||
/// </summary>
|
||||
/// <param name="object"></param>
|
||||
/// <returns></returns>
|
||||
private GameObject RecurseTreeToNative( object @object )
|
||||
{
|
||||
if ( IsList( @object ) ) {
|
||||
var list = ( (IEnumerable) @object ).Cast<object>( );
|
||||
var objects = list.Select( x => RecurseTreeToNative( x ) ).Where( x => x != null ).ToList( );
|
||||
if ( objects.Any( ) ) {
|
||||
var go = new GameObject( );
|
||||
go.name = "List";
|
||||
objects.ForEach( x => x.transform.parent = go.transform );
|
||||
return go;
|
||||
}
|
||||
} else {
|
||||
return TryConvertItemToNative( @object );
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
private GameObject TryConvertItemToNative( object value )
|
||||
{
|
||||
if ( value == null )
|
||||
return null;
|
||||
|
||||
//it's a simple type or not a Base
|
||||
if ( value.GetType( ).IsSimpleType( ) || !( value is Base ) ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
var @base = (Base) value;
|
||||
|
||||
//it's an unsupported Base, go through each of its property and try convert that
|
||||
if ( !_converter.CanConvertToNative( @base ) ) {
|
||||
var members = @base.GetMemberNames( ).ToList( );
|
||||
|
||||
//empty game object with the commit id as name, used to contain all the rest
|
||||
var go = new GameObject( );
|
||||
go.name = @base.speckle_type;
|
||||
var goos = new List<GameObject>( );
|
||||
foreach ( var member in members ) {
|
||||
var goo = RecurseTreeToNative( @base[ member ] );
|
||||
if ( goo != null ) {
|
||||
goo.name = member;
|
||||
goo.transform.parent = go.transform;
|
||||
goos.Add( goo );
|
||||
}
|
||||
}
|
||||
|
||||
//if no children is valid, return null
|
||||
if ( !goos.Any( ) ) {
|
||||
Destroy( go );
|
||||
return null;
|
||||
}
|
||||
|
||||
return go;
|
||||
} else {
|
||||
try {
|
||||
var go = _converter.ConvertToNative( @base ) as GameObject;
|
||||
// Some revit elements have nested elements in a "elements" property
|
||||
// for instance hosted families on a wall
|
||||
if ( go != null && @base[ "elements" ] is List<Base> l && l.Any( ) ) {
|
||||
var goo = RecurseTreeToNative( l );
|
||||
if ( goo != null ) {
|
||||
goo.name = "elements";
|
||||
goo.transform.parent = go.transform;
|
||||
}
|
||||
}
|
||||
|
||||
return go;
|
||||
}
|
||||
catch ( Exception e ) {
|
||||
throw new SpeckleException( e.Message, e, true, SentryLevel.Error );
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
private static bool IsList( object @object )
|
||||
{
|
||||
if ( @object == null )
|
||||
return false;
|
||||
|
||||
var type = @object.GetType( );
|
||||
return ( typeof( IEnumerable ).IsAssignableFrom( type ) && !typeof( IDictionary ).IsAssignableFrom( type ) &&
|
||||
type != typeof( string ) );
|
||||
}
|
||||
|
||||
private static bool IsDictionary( object @object )
|
||||
{
|
||||
if ( @object == null )
|
||||
return false;
|
||||
|
||||
Type type = @object.GetType( );
|
||||
return type.IsGenericType && type.GetGenericTypeDefinition( ) == typeof( Dictionary<,> );
|
||||
}
|
||||
|
||||
private void OnDestroy( )
|
||||
{
|
||||
Client?.CommitCreatedSubscription?.Dispose( );
|
||||
}
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,113 +0,0 @@
|
||||
using Objects.Converter.Unity;
|
||||
using Speckle.Core.Api;
|
||||
using Speckle.Core.Api.SubscriptionModels;
|
||||
using Speckle.Core.Credentials;
|
||||
using Speckle.Core.Logging;
|
||||
using Speckle.Core.Models;
|
||||
using Speckle.Core.Transports;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Concurrent;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Sentry;
|
||||
using Sentry.Protocol;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Speckle.ConnectorUnity
|
||||
{
|
||||
/// <summary>
|
||||
/// A Speckle Sender, it's a wrapper around a basic Speckle Client
|
||||
/// that handles conversions for you
|
||||
/// </summary>
|
||||
public class Sender : MonoBehaviour
|
||||
{
|
||||
/// <summary>
|
||||
/// Converts and sends the data of the last commit on the Stream
|
||||
/// </summary>
|
||||
/// <param name="streamId">ID of the stream to send to</param>
|
||||
/// <param name="gameObjects">List of gameObjects to convert and send</param>
|
||||
/// <param name="account">Account to use. If not provided the default account will be used</param>
|
||||
/// <param name="onDataSentAction">Action to run after the data has been sent</param>
|
||||
/// <param name="onProgressAction">Action to run when there is download/conversion progress</param>
|
||||
/// <param name="onErrorAction">Action to run on error</param>
|
||||
/// <exception cref="SpeckleException"></exception>
|
||||
public void Send(string streamId, List<GameObject> gameObjects, Account account = null,
|
||||
Action<string> onDataSentAction = null,
|
||||
Action<ConcurrentDictionary<string, int>> onProgressAction = null,
|
||||
Action<string, Exception> onErrorAction = null)
|
||||
{
|
||||
try
|
||||
{
|
||||
var data = ConvertRecursivelyToSpeckle(gameObjects);
|
||||
Task.Run(async () =>
|
||||
{
|
||||
var res = await Helpers.Send(streamId, data, "Data from unity!",
|
||||
account: account,
|
||||
onErrorAction: onErrorAction,
|
||||
onProgressAction: onProgressAction);
|
||||
|
||||
onDataSentAction?.Invoke(res);
|
||||
});
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
throw new SpeckleException(e.Message, e, true, SentryLevel.Error);
|
||||
}
|
||||
}
|
||||
|
||||
#region private methods
|
||||
|
||||
private Base ConvertRecursivelyToSpeckle(List<GameObject> gos)
|
||||
{
|
||||
if (gos.Count == 1)
|
||||
{
|
||||
return RecurseTreeToNative(gos[0]);
|
||||
}
|
||||
|
||||
var @base = new Base();
|
||||
@base["objects"] = gos.Select(x => RecurseTreeToNative(x)).Where(x => x != null).ToList();
|
||||
return @base;
|
||||
}
|
||||
|
||||
private Base RecurseTreeToNative(GameObject go)
|
||||
{
|
||||
var converter = new ConverterUnity();
|
||||
if (converter.CanConvertToSpeckle(go))
|
||||
{
|
||||
try
|
||||
{
|
||||
return converter.ConvertToSpeckle(go);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Debug.LogError(e);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
if (go.transform.childCount > 0)
|
||||
{
|
||||
var @base = new Base();
|
||||
var objects = new List<Base>();
|
||||
for (var i = 0; i < go.transform.childCount; i++)
|
||||
{
|
||||
var goo = RecurseTreeToNative(go.transform.GetChild(i).gameObject);
|
||||
if (goo != null)
|
||||
objects.Add(goo);
|
||||
}
|
||||
|
||||
if (objects.Any())
|
||||
{
|
||||
@base["objects"] = objects;
|
||||
return @base;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Speckle.ConnectorUnity
|
||||
{
|
||||
/// <summary>
|
||||
/// This class gets attached to GOs and is used to store Speckle's metadata when sending / receiving
|
||||
/// </summary>
|
||||
public class SpeckleProperties : MonoBehaviour
|
||||
{
|
||||
public Dictionary<string, object> Data { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,44 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Speckle.Core.Api;
|
||||
using Speckle.Core.Credentials;
|
||||
using Speckle.Core.Logging;
|
||||
|
||||
namespace Speckle.ConnectorUnity
|
||||
{
|
||||
public static class Streams
|
||||
{
|
||||
public static async Task<List<Stream>> List(int limit = 10)
|
||||
{
|
||||
Tracker.TrackPageview(Tracker.STREAM_LIST);
|
||||
var account = AccountManager.GetDefaultAccount();
|
||||
if (account == null)
|
||||
return new List<Stream>();
|
||||
var client = new Client(account);
|
||||
|
||||
var res = await client.StreamsGet(limit);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
public static async Task<Stream> Get(string streamId, int limit = 10)
|
||||
{
|
||||
Tracker.TrackPageview(Tracker.STREAM_GET);
|
||||
var account = AccountManager.GetDefaultAccount();
|
||||
if (account == null)
|
||||
return null;
|
||||
var client = new Client(account);
|
||||
|
||||
var res = await client.StreamGet(streamId, limit);
|
||||
|
||||
if (res.branches.items != null)
|
||||
{
|
||||
res.branches.items.Reverse();
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Speckle.ConnectorUnity
|
||||
{
|
||||
public static class Utils
|
||||
{
|
||||
public static int ToIntColor(this Color c)
|
||||
{
|
||||
return
|
||||
System.Drawing.Color
|
||||
.FromArgb(Convert.ToInt32(c.r * 255), Convert.ToInt32(c.r * 255), Convert.ToInt32(c.r * 255))
|
||||
.ToArgb();
|
||||
}
|
||||
|
||||
public static Color ToUnityColor(this int c)
|
||||
{
|
||||
var argb = System.Drawing.Color.FromArgb(c);
|
||||
return new Color(argb.R / 255.0f, argb.G / 255.0f, argb.B / 255.0f);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,142 +0,0 @@
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Speckle.ConnectorUnity {
|
||||
//https://forum.unity.com/threads/async-await-in-editor-script.481276/
|
||||
//https://forum.unity.com/threads/follow-up-async-methods-continue-to-execute-when-you-stop-the-game-in-the-editor-potentially-dange.949671/
|
||||
|
||||
[CustomEditor( typeof( BabyStreamManager ) )]
|
||||
[CanEditMultipleObjects]
|
||||
public class BabyStreamManagerEditor : Editor {
|
||||
|
||||
private int _listValue = 10;
|
||||
private bool _auto,_foldOutAccount, _foldOutStreams;
|
||||
private string[ ] _streamNames,_accountNames;
|
||||
private int _selectedStreamIndex, _selectedBranchIndex, _selectedCommitIndex, _selectedAccountIndex, _selectedServerIndex;
|
||||
|
||||
[InitializeOnLoadMethod]
|
||||
private static void Initialize( ) => EditorApplication.update += Ayuda.ExecuteContinuations;
|
||||
|
||||
private void OnEnable( )
|
||||
{
|
||||
BabyStreamManager script = (BabyStreamManager) target;
|
||||
_accountNames = script.Fetch.Accounts.GetNames( ).ToArray( );
|
||||
script.GetSpeckleAccountData( );
|
||||
}
|
||||
|
||||
public override async void OnInspectorGUI( )
|
||||
{
|
||||
DrawDefaultInspector( );
|
||||
serializedObject.Update( );
|
||||
|
||||
BabyStreamManager script = (BabyStreamManager) target;
|
||||
|
||||
#region Account GUI
|
||||
EditorGUILayout.BeginHorizontal( );
|
||||
|
||||
_selectedAccountIndex = EditorGUILayout.Popup( "Accounts", _selectedAccountIndex, _accountNames, GUILayout.ExpandWidth( true ), GUILayout.Height( 20 ) );
|
||||
|
||||
if ( GUILayout.Button( "Load", GUILayout.Width( 60 ), GUILayout.Height( 20 ) ) || _accountNames == null ) {
|
||||
await Task.Run( ( ) => script.GetSpeckleAccountData( ) );
|
||||
_accountNames = script.Fetch.Accounts.GetNames( ).ToArray( );
|
||||
return;
|
||||
}
|
||||
|
||||
EditorGUILayout.EndHorizontal( );
|
||||
|
||||
#region Speckle Account Info
|
||||
_foldOutAccount = EditorGUILayout.BeginFoldoutHeaderGroup( _foldOutAccount, "Account Info" );
|
||||
|
||||
if ( _foldOutAccount ) {
|
||||
EditorGUI.BeginDisabledGroup( true );
|
||||
|
||||
EditorGUILayout.TextField( "Name", script.Fetch.AccountName,
|
||||
GUILayout.Height( 20 ),
|
||||
GUILayout.ExpandWidth( true ) );
|
||||
|
||||
EditorGUILayout.TextField( "Server", script.Fetch.ServerName,
|
||||
GUILayout.Height( 20 ),
|
||||
GUILayout.ExpandWidth( true ) );
|
||||
|
||||
EditorGUILayout.TextField( "URL", script.Fetch.ServerURL,
|
||||
GUILayout.Height( 20 ),
|
||||
GUILayout.ExpandWidth( true ) );
|
||||
|
||||
EditorGUI.EndDisabledGroup( );
|
||||
}
|
||||
|
||||
EditorGUILayout.EndFoldoutHeaderGroup( );
|
||||
#endregion
|
||||
|
||||
#region Stream Limit
|
||||
EditorGUILayout.Separator( );
|
||||
|
||||
_listValue = EditorGUILayout.IntSlider( "Limit", _listValue, 1, 10, GUILayout.ExpandWidth( true ) );
|
||||
script.ListLimit = _listValue;
|
||||
#endregion
|
||||
|
||||
EditorGUILayout.Separator( );
|
||||
#endregion
|
||||
|
||||
#region Stream List
|
||||
var items = script.Fetch.StreamsByName.ToArray( );
|
||||
|
||||
EditorGUILayout.BeginHorizontal( );
|
||||
|
||||
_selectedStreamIndex = EditorGUILayout.Popup( "Streams",
|
||||
_selectedStreamIndex, items, GUILayout.Height( 20 ), GUILayout.ExpandWidth( true ) );
|
||||
|
||||
if ( GUILayout.Button( "Load", GUILayout.Width( 60 ), GUILayout.Height( 20 ) ) ) {
|
||||
Debug.Log( "Loading stream " );
|
||||
await Task.Run( ( ) => script.SelectStreamFromList( _selectedStreamIndex ) );
|
||||
return;
|
||||
}
|
||||
|
||||
EditorGUILayout.EndHorizontal( );
|
||||
#endregion
|
||||
|
||||
#region Stream Branch GUI
|
||||
var streamStatus = script.StreamReady && script.Fetch.SelectedStreamIndex == _selectedStreamIndex;
|
||||
items = streamStatus ? script.Fetch.BranchesByName.ToArray( ) : new[ ] {"stream is not loaded"};
|
||||
|
||||
// branch selection
|
||||
_selectedBranchIndex = EditorGUILayout.Popup( "Branches",
|
||||
_selectedBranchIndex, items, GUILayout.Height( 20 ), GUILayout.ExpandWidth( true ) );
|
||||
script.SetSelectedBranch = _selectedStreamIndex;
|
||||
|
||||
// commit selection
|
||||
items = streamStatus ? script.Fetch.CommitsById.ToArray( ) : new[ ] {"stream is not loaded"};
|
||||
_selectedCommitIndex = EditorGUILayout.Popup( "Commits",
|
||||
_selectedCommitIndex, items, GUILayout.Height( 20 ), GUILayout.ExpandWidth( true ) );
|
||||
|
||||
script.SetSelectedCommit = _selectedCommitIndex;
|
||||
#endregion
|
||||
|
||||
GUILayout.BeginHorizontal( );
|
||||
|
||||
var auto = GUILayout.Toggle( _auto, "AutoLoad", GUILayout.ExpandWidth( false ) );
|
||||
if ( auto != _auto ) {
|
||||
_auto = auto;
|
||||
script.AutoUpdate = _auto;
|
||||
}
|
||||
GUILayout.Space( 50 );
|
||||
|
||||
var ready = script.IsReady && script.InProcess == false;
|
||||
|
||||
EditorGUI.BeginDisabledGroup( !ready );
|
||||
|
||||
if ( GUILayout.Button( !ready ? "Loading... " : "Load Stream" ) ) {
|
||||
if ( ready )
|
||||
script.LoadStream( );
|
||||
}
|
||||
EditorGUI.EndDisabledGroup( );
|
||||
|
||||
GUILayout.EndHorizontal( );
|
||||
|
||||
serializedObject.ApplyModifiedProperties( );
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,109 +0,0 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Speckle.Core.Api;
|
||||
using Speckle.Core.Credentials;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Speckle.ConnectorUnity.GUI {
|
||||
public class FunBatch {
|
||||
|
||||
public Action<bool> MightHaveWork;
|
||||
public async void Init( )
|
||||
{
|
||||
var speckleAccount = AccountManager.GetAccounts( ).FirstOrDefault( );
|
||||
|
||||
if ( speckleAccount == null ) {
|
||||
Debug.Log( "Please set a default account in SpeckleManager" );
|
||||
return;
|
||||
}
|
||||
var client = new Client( speckleAccount );
|
||||
|
||||
var streams = await client.StreamsGet( 10 );
|
||||
var stream = streams.FirstOrDefault( s => s.name.Equals( "WhiteDoe" ) );
|
||||
|
||||
var instance = new GameObject( stream.name ).AddComponent<Receiver>( );
|
||||
|
||||
instance.Init( stream.id, false, false, speckleAccount,
|
||||
onDataReceivedAction: go => { go.transform.SetParent( instance.transform ); },
|
||||
onTotalChildrenCountKnown: count => { instance.TotalChildrenCount = count; },
|
||||
onProgressAction: dict => { Dispatcher.Instance.Enqueue( ( ) => { Debug.Log( dict.Values.Average( ) / instance.TotalChildrenCount ); } ); } );
|
||||
|
||||
instance.ReceiveCompleteAction += ( ) => {
|
||||
MightHaveWork?.Invoke( true );
|
||||
Debug.Log( "Receive Complete" );
|
||||
};
|
||||
instance.Receive( "main" );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
[CustomEditor( typeof( Dispatcher ) )]
|
||||
public class DispatcherEditor : Editor {
|
||||
|
||||
[InitializeOnLoadMethod]
|
||||
private static void Initialize( ) => EditorApplication.update += Ayuda.ExecuteContinuations;
|
||||
|
||||
|
||||
public override async void OnInspectorGUI( )
|
||||
{
|
||||
DrawDefaultInspector( );
|
||||
serializedObject.Update( );
|
||||
|
||||
Dispatcher script = (Dispatcher) target;
|
||||
|
||||
GUILayout.BeginHorizontal( );
|
||||
|
||||
if ( GUILayout.Button( "Owner Batch" ) ) {
|
||||
Dispatcher.Ownerless = false;
|
||||
// await Task.Run(script.EnqueueAsync( DoTimeConsumingStuff ) );
|
||||
Ayuda.SyncCall( _ => script.Enqueue( DoTimeConsumingStuff ) );
|
||||
}
|
||||
|
||||
if ( GUILayout.Button( "Ownerless Batch" ) ) {
|
||||
Dispatcher.Ownerless = true;
|
||||
Ayuda.SyncCall( _ => script.Enqueue( DoTimeConsumingStuff ) );
|
||||
}
|
||||
|
||||
GUILayout.EndHorizontal( );
|
||||
|
||||
// GUILayout.BeginHorizontal( );
|
||||
//
|
||||
// if ( GUILayout.Button( "Async Owner Batch" ) ) {
|
||||
// if ( !_doingThings ) {
|
||||
// Dispatcher.Ownerless = false;
|
||||
// await script.EnqueueAsync( DoTimeConsumingStuff );
|
||||
// return;
|
||||
// }
|
||||
//
|
||||
// Debug.Log( "Doing Things!" );
|
||||
// }
|
||||
//
|
||||
// if ( GUILayout.Button( "Async Ownerless Batch" ) ) {
|
||||
// if ( !_doingThings ) {
|
||||
// Dispatcher.Ownerless = true;
|
||||
// await script.EnqueueAsync( DoTimeConsumingStuff );
|
||||
// return;
|
||||
// }
|
||||
//
|
||||
// Debug.Log( "Doing Things!" );
|
||||
// }
|
||||
//
|
||||
// GUILayout.EndHorizontal( );
|
||||
|
||||
serializedObject.ApplyModifiedProperties( );
|
||||
}
|
||||
|
||||
private void DoTimeConsumingStuff( )
|
||||
{
|
||||
Debug.Log( "doing..." );
|
||||
Thread.Sleep( 200 );
|
||||
Debug.Log( "done: " + Thread.CurrentThread.ManagedThreadId );
|
||||
// force refresh
|
||||
Repaint( );
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,358 +0,0 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!29 &1
|
||||
OcclusionCullingSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_OcclusionBakeSettings:
|
||||
smallestOccluder: 5
|
||||
smallestHole: 0.25
|
||||
backfaceThreshold: 100
|
||||
m_SceneGUID: 00000000000000000000000000000000
|
||||
m_OcclusionCullingData: {fileID: 0}
|
||||
--- !u!104 &2
|
||||
RenderSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 9
|
||||
m_Fog: 0
|
||||
m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
|
||||
m_FogMode: 3
|
||||
m_FogDensity: 0.01
|
||||
m_LinearFogStart: 0
|
||||
m_LinearFogEnd: 300
|
||||
m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1}
|
||||
m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1}
|
||||
m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}
|
||||
m_AmbientIntensity: 1
|
||||
m_AmbientMode: 0
|
||||
m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
|
||||
m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_HaloStrength: 0.5
|
||||
m_FlareStrength: 1
|
||||
m_FlareFadeSpeed: 3
|
||||
m_HaloTexture: {fileID: 0}
|
||||
m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_DefaultReflectionMode: 0
|
||||
m_DefaultReflectionResolution: 128
|
||||
m_ReflectionBounces: 1
|
||||
m_ReflectionIntensity: 1
|
||||
m_CustomReflection: {fileID: 0}
|
||||
m_Sun: {fileID: 0}
|
||||
m_IndirectSpecularColor: {r: 0.44657898, g: 0.4964133, b: 0.5748178, a: 1}
|
||||
m_UseRadianceAmbientProbe: 0
|
||||
--- !u!157 &3
|
||||
LightmapSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 12
|
||||
m_GIWorkflowMode: 1
|
||||
m_GISettings:
|
||||
serializedVersion: 2
|
||||
m_BounceScale: 1
|
||||
m_IndirectOutputScale: 1
|
||||
m_AlbedoBoost: 1
|
||||
m_EnvironmentLightingMode: 0
|
||||
m_EnableBakedLightmaps: 1
|
||||
m_EnableRealtimeLightmaps: 0
|
||||
m_LightmapEditorSettings:
|
||||
serializedVersion: 12
|
||||
m_Resolution: 2
|
||||
m_BakeResolution: 40
|
||||
m_AtlasSize: 1024
|
||||
m_AO: 0
|
||||
m_AOMaxDistance: 1
|
||||
m_CompAOExponent: 1
|
||||
m_CompAOExponentDirect: 0
|
||||
m_ExtractAmbientOcclusion: 0
|
||||
m_Padding: 2
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_LightmapsBakeMode: 1
|
||||
m_TextureCompression: 1
|
||||
m_FinalGather: 0
|
||||
m_FinalGatherFiltering: 1
|
||||
m_FinalGatherRayCount: 256
|
||||
m_ReflectionCompression: 2
|
||||
m_MixedBakeMode: 2
|
||||
m_BakeBackend: 1
|
||||
m_PVRSampling: 1
|
||||
m_PVRDirectSampleCount: 32
|
||||
m_PVRSampleCount: 512
|
||||
m_PVRBounces: 2
|
||||
m_PVREnvironmentSampleCount: 256
|
||||
m_PVREnvironmentReferencePointCount: 2048
|
||||
m_PVRFilteringMode: 1
|
||||
m_PVRDenoiserTypeDirect: 1
|
||||
m_PVRDenoiserTypeIndirect: 1
|
||||
m_PVRDenoiserTypeAO: 1
|
||||
m_PVRFilterTypeDirect: 0
|
||||
m_PVRFilterTypeIndirect: 0
|
||||
m_PVRFilterTypeAO: 0
|
||||
m_PVREnvironmentMIS: 1
|
||||
m_PVRCulling: 1
|
||||
m_PVRFilteringGaussRadiusDirect: 1
|
||||
m_PVRFilteringGaussRadiusIndirect: 5
|
||||
m_PVRFilteringGaussRadiusAO: 2
|
||||
m_PVRFilteringAtrousPositionSigmaDirect: 0.5
|
||||
m_PVRFilteringAtrousPositionSigmaIndirect: 2
|
||||
m_PVRFilteringAtrousPositionSigmaAO: 1
|
||||
m_ExportTrainingData: 0
|
||||
m_TrainingDataDestination: TrainingData
|
||||
m_LightProbeSampleCountMultiplier: 4
|
||||
m_LightingDataAsset: {fileID: 0}
|
||||
m_LightingSettings: {fileID: 0}
|
||||
--- !u!196 &4
|
||||
NavMeshSettings:
|
||||
serializedVersion: 2
|
||||
m_ObjectHideFlags: 0
|
||||
m_BuildSettings:
|
||||
serializedVersion: 2
|
||||
agentTypeID: 0
|
||||
agentRadius: 0.5
|
||||
agentHeight: 2
|
||||
agentSlope: 45
|
||||
agentClimb: 0.4
|
||||
ledgeDropHeight: 0
|
||||
maxJumpAcrossDistance: 0
|
||||
minRegionArea: 2
|
||||
manualCellSize: 0
|
||||
cellSize: 0.16666667
|
||||
manualTileSize: 0
|
||||
tileSize: 256
|
||||
accuratePlacement: 0
|
||||
maxJobWorkers: 0
|
||||
preserveTilesOutsideBounds: 0
|
||||
debug:
|
||||
m_Flags: 0
|
||||
m_NavMeshData: {fileID: 0}
|
||||
--- !u!1 &323147531
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 323147534}
|
||||
- component: {fileID: 323147533}
|
||||
- component: {fileID: 323147532}
|
||||
m_Layer: 0
|
||||
m_Name: Main Camera
|
||||
m_TagString: MainCamera
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!81 &323147532
|
||||
AudioListener:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 323147531}
|
||||
m_Enabled: 1
|
||||
--- !u!20 &323147533
|
||||
Camera:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 323147531}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_ClearFlags: 1
|
||||
m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}
|
||||
m_projectionMatrixMode: 1
|
||||
m_GateFitMode: 2
|
||||
m_FOVAxisMode: 0
|
||||
m_SensorSize: {x: 36, y: 24}
|
||||
m_LensShift: {x: 0, y: 0}
|
||||
m_FocalLength: 50
|
||||
m_NormalizedViewPortRect:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 0
|
||||
width: 1
|
||||
height: 1
|
||||
near clip plane: 0.3
|
||||
far clip plane: 1000
|
||||
field of view: 60
|
||||
orthographic: 0
|
||||
orthographic size: 5
|
||||
m_Depth: -1
|
||||
m_CullingMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_RenderingPath: -1
|
||||
m_TargetTexture: {fileID: 0}
|
||||
m_TargetDisplay: 0
|
||||
m_TargetEye: 3
|
||||
m_HDR: 1
|
||||
m_AllowMSAA: 1
|
||||
m_AllowDynamicResolution: 0
|
||||
m_ForceIntoRT: 0
|
||||
m_OcclusionCulling: 1
|
||||
m_StereoConvergence: 10
|
||||
m_StereoSeparation: 0.022
|
||||
--- !u!4 &323147534
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 323147531}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 1, z: -10}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &1013213356
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1013213358}
|
||||
- component: {fileID: 1013213357}
|
||||
m_Layer: 0
|
||||
m_Name: Directional Light
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!108 &1013213357
|
||||
Light:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1013213356}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 10
|
||||
m_Type: 1
|
||||
m_Shape: 0
|
||||
m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1}
|
||||
m_Intensity: 1
|
||||
m_Range: 10
|
||||
m_SpotAngle: 30
|
||||
m_InnerSpotAngle: 21.80208
|
||||
m_CookieSize: 10
|
||||
m_Shadows:
|
||||
m_Type: 2
|
||||
m_Resolution: -1
|
||||
m_CustomResolution: -1
|
||||
m_Strength: 1
|
||||
m_Bias: 0.05
|
||||
m_NormalBias: 0.4
|
||||
m_NearPlane: 0.2
|
||||
m_CullingMatrixOverride:
|
||||
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_UseCullingMatrixOverride: 0
|
||||
m_Cookie: {fileID: 0}
|
||||
m_DrawHalo: 0
|
||||
m_Flare: {fileID: 0}
|
||||
m_RenderMode: 0
|
||||
m_CullingMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_RenderingLayerMask: 1
|
||||
m_Lightmapping: 4
|
||||
m_LightShadowCasterMode: 0
|
||||
m_AreaSize: {x: 1, y: 1}
|
||||
m_BounceIntensity: 1
|
||||
m_ColorTemperature: 6570
|
||||
m_UseColorTemperature: 0
|
||||
m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_UseBoundingSphereOverride: 0
|
||||
m_UseViewFrustumForShadowCasterCull: 1
|
||||
m_ShadowRadius: 0
|
||||
m_ShadowAngle: 0
|
||||
--- !u!4 &1013213358
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1013213356}
|
||||
m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261}
|
||||
m_LocalPosition: {x: 0, y: 3, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0}
|
||||
--- !u!1 &1987772512
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1987772514}
|
||||
- component: {fileID: 1987772515}
|
||||
- component: {fileID: 1987772513}
|
||||
m_Layer: 0
|
||||
m_Name: StreamManager
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!114 &1987772513
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1987772512}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 27492dda437de4643b9f10552c3aab1f, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
streamObj: {fileID: 0}
|
||||
--- !u!4 &1987772514
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1987772512}
|
||||
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: 0}
|
||||
m_RootOrder: 2
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &1987772515
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1987772512}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 446eb2de03584f959b5aaf9427734028, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
@@ -1,400 +0,0 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!29 &1
|
||||
OcclusionCullingSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_OcclusionBakeSettings:
|
||||
smallestOccluder: 5
|
||||
smallestHole: 0.25
|
||||
backfaceThreshold: 100
|
||||
m_SceneGUID: 00000000000000000000000000000000
|
||||
m_OcclusionCullingData: {fileID: 0}
|
||||
--- !u!104 &2
|
||||
RenderSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 9
|
||||
m_Fog: 0
|
||||
m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
|
||||
m_FogMode: 3
|
||||
m_FogDensity: 0.01
|
||||
m_LinearFogStart: 0
|
||||
m_LinearFogEnd: 300
|
||||
m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1}
|
||||
m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1}
|
||||
m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}
|
||||
m_AmbientIntensity: 1
|
||||
m_AmbientMode: 0
|
||||
m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
|
||||
m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_HaloStrength: 0.5
|
||||
m_FlareStrength: 1
|
||||
m_FlareFadeSpeed: 3
|
||||
m_HaloTexture: {fileID: 0}
|
||||
m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_DefaultReflectionMode: 0
|
||||
m_DefaultReflectionResolution: 128
|
||||
m_ReflectionBounces: 1
|
||||
m_ReflectionIntensity: 1
|
||||
m_CustomReflection: {fileID: 0}
|
||||
m_Sun: {fileID: 0}
|
||||
m_IndirectSpecularColor: {r: 0.44657898, g: 0.4964133, b: 0.5748178, a: 1}
|
||||
m_UseRadianceAmbientProbe: 0
|
||||
--- !u!157 &3
|
||||
LightmapSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 12
|
||||
m_GIWorkflowMode: 1
|
||||
m_GISettings:
|
||||
serializedVersion: 2
|
||||
m_BounceScale: 1
|
||||
m_IndirectOutputScale: 1
|
||||
m_AlbedoBoost: 1
|
||||
m_EnvironmentLightingMode: 0
|
||||
m_EnableBakedLightmaps: 1
|
||||
m_EnableRealtimeLightmaps: 0
|
||||
m_LightmapEditorSettings:
|
||||
serializedVersion: 12
|
||||
m_Resolution: 2
|
||||
m_BakeResolution: 40
|
||||
m_AtlasSize: 1024
|
||||
m_AO: 0
|
||||
m_AOMaxDistance: 1
|
||||
m_CompAOExponent: 1
|
||||
m_CompAOExponentDirect: 0
|
||||
m_ExtractAmbientOcclusion: 0
|
||||
m_Padding: 2
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_LightmapsBakeMode: 1
|
||||
m_TextureCompression: 1
|
||||
m_FinalGather: 0
|
||||
m_FinalGatherFiltering: 1
|
||||
m_FinalGatherRayCount: 256
|
||||
m_ReflectionCompression: 2
|
||||
m_MixedBakeMode: 2
|
||||
m_BakeBackend: 1
|
||||
m_PVRSampling: 1
|
||||
m_PVRDirectSampleCount: 32
|
||||
m_PVRSampleCount: 512
|
||||
m_PVRBounces: 2
|
||||
m_PVREnvironmentSampleCount: 256
|
||||
m_PVREnvironmentReferencePointCount: 2048
|
||||
m_PVRFilteringMode: 1
|
||||
m_PVRDenoiserTypeDirect: 1
|
||||
m_PVRDenoiserTypeIndirect: 1
|
||||
m_PVRDenoiserTypeAO: 1
|
||||
m_PVRFilterTypeDirect: 0
|
||||
m_PVRFilterTypeIndirect: 0
|
||||
m_PVRFilterTypeAO: 0
|
||||
m_PVREnvironmentMIS: 1
|
||||
m_PVRCulling: 1
|
||||
m_PVRFilteringGaussRadiusDirect: 1
|
||||
m_PVRFilteringGaussRadiusIndirect: 5
|
||||
m_PVRFilteringGaussRadiusAO: 2
|
||||
m_PVRFilteringAtrousPositionSigmaDirect: 0.5
|
||||
m_PVRFilteringAtrousPositionSigmaIndirect: 2
|
||||
m_PVRFilteringAtrousPositionSigmaAO: 1
|
||||
m_ExportTrainingData: 0
|
||||
m_TrainingDataDestination: TrainingData
|
||||
m_LightProbeSampleCountMultiplier: 4
|
||||
m_LightingDataAsset: {fileID: 0}
|
||||
m_LightingSettings: {fileID: 0}
|
||||
--- !u!196 &4
|
||||
NavMeshSettings:
|
||||
serializedVersion: 2
|
||||
m_ObjectHideFlags: 0
|
||||
m_BuildSettings:
|
||||
serializedVersion: 2
|
||||
agentTypeID: 0
|
||||
agentRadius: 0.5
|
||||
agentHeight: 2
|
||||
agentSlope: 45
|
||||
agentClimb: 0.4
|
||||
ledgeDropHeight: 0
|
||||
maxJumpAcrossDistance: 0
|
||||
minRegionArea: 2
|
||||
manualCellSize: 0
|
||||
cellSize: 0.16666667
|
||||
manualTileSize: 0
|
||||
tileSize: 256
|
||||
accuratePlacement: 0
|
||||
maxJobWorkers: 0
|
||||
preserveTilesOutsideBounds: 0
|
||||
debug:
|
||||
m_Flags: 0
|
||||
m_NavMeshData: {fileID: 0}
|
||||
--- !u!1 &323147531
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 323147534}
|
||||
- component: {fileID: 323147533}
|
||||
- component: {fileID: 323147532}
|
||||
m_Layer: 0
|
||||
m_Name: Main Camera
|
||||
m_TagString: MainCamera
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!81 &323147532
|
||||
AudioListener:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 323147531}
|
||||
m_Enabled: 1
|
||||
--- !u!20 &323147533
|
||||
Camera:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 323147531}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_ClearFlags: 1
|
||||
m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}
|
||||
m_projectionMatrixMode: 1
|
||||
m_GateFitMode: 2
|
||||
m_FOVAxisMode: 0
|
||||
m_SensorSize: {x: 36, y: 24}
|
||||
m_LensShift: {x: 0, y: 0}
|
||||
m_FocalLength: 50
|
||||
m_NormalizedViewPortRect:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 0
|
||||
width: 1
|
||||
height: 1
|
||||
near clip plane: 0.3
|
||||
far clip plane: 1000
|
||||
field of view: 60
|
||||
orthographic: 0
|
||||
orthographic size: 5
|
||||
m_Depth: -1
|
||||
m_CullingMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_RenderingPath: -1
|
||||
m_TargetTexture: {fileID: 0}
|
||||
m_TargetDisplay: 0
|
||||
m_TargetEye: 3
|
||||
m_HDR: 1
|
||||
m_AllowMSAA: 1
|
||||
m_AllowDynamicResolution: 0
|
||||
m_ForceIntoRT: 0
|
||||
m_OcclusionCulling: 1
|
||||
m_StereoConvergence: 10
|
||||
m_StereoSeparation: 0.022
|
||||
--- !u!4 &323147534
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 323147531}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 1, z: -10}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &458225217
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 458225219}
|
||||
- component: {fileID: 458225218}
|
||||
m_Layer: 0
|
||||
m_Name: RainbowHierarchyRuleset
|
||||
m_TagString: EditorOnly
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!114 &458225218
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 458225217}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 366663908, guid: ebe26e22332665d4c8332b2a624e5e8b, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
Rules:
|
||||
- Type: 0
|
||||
Name:
|
||||
GameObject: {fileID: 1987772512}
|
||||
Ordinal: 0
|
||||
Priority: 0
|
||||
IconType: 2740
|
||||
IconTexture: {fileID: 0}
|
||||
IsIconRecursive: 0
|
||||
BackgroundType: 100
|
||||
BackgroundTexture: {fileID: 0}
|
||||
IsBackgroundRecursive: 0
|
||||
IsHidden: 0
|
||||
--- !u!4 &458225219
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 458225217}
|
||||
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: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &1013213356
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1013213358}
|
||||
- component: {fileID: 1013213357}
|
||||
m_Layer: 0
|
||||
m_Name: Directional Light
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!108 &1013213357
|
||||
Light:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1013213356}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 10
|
||||
m_Type: 1
|
||||
m_Shape: 0
|
||||
m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1}
|
||||
m_Intensity: 1
|
||||
m_Range: 10
|
||||
m_SpotAngle: 30
|
||||
m_InnerSpotAngle: 21.80208
|
||||
m_CookieSize: 10
|
||||
m_Shadows:
|
||||
m_Type: 2
|
||||
m_Resolution: -1
|
||||
m_CustomResolution: -1
|
||||
m_Strength: 1
|
||||
m_Bias: 0.05
|
||||
m_NormalBias: 0.4
|
||||
m_NearPlane: 0.2
|
||||
m_CullingMatrixOverride:
|
||||
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_UseCullingMatrixOverride: 0
|
||||
m_Cookie: {fileID: 0}
|
||||
m_DrawHalo: 0
|
||||
m_Flare: {fileID: 0}
|
||||
m_RenderMode: 0
|
||||
m_CullingMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_RenderingLayerMask: 1
|
||||
m_Lightmapping: 4
|
||||
m_LightShadowCasterMode: 0
|
||||
m_AreaSize: {x: 1, y: 1}
|
||||
m_BounceIntensity: 1
|
||||
m_ColorTemperature: 6570
|
||||
m_UseColorTemperature: 0
|
||||
m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_UseBoundingSphereOverride: 0
|
||||
m_UseViewFrustumForShadowCasterCull: 1
|
||||
m_ShadowRadius: 0
|
||||
m_ShadowAngle: 0
|
||||
--- !u!4 &1013213358
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1013213356}
|
||||
m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261}
|
||||
m_LocalPosition: {x: 0, y: 3, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 2
|
||||
m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0}
|
||||
--- !u!1 &1987772512
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1987772514}
|
||||
- component: {fileID: 1987772515}
|
||||
m_Layer: 0
|
||||
m_Name: FunBatcher
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &1987772514
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1987772512}
|
||||
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: 0}
|
||||
m_RootOrder: 3
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &1987772515
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1987772512}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 446eb2de03584f959b5aaf9427734028, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
@@ -1,68 +0,0 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Threading;
|
||||
using Speckle.Core.Api;
|
||||
using Speckle.Core.Credentials;
|
||||
|
||||
namespace Speckle.ConnectorUnity {
|
||||
public readonly struct SpeckleSimpleInfo {
|
||||
|
||||
public SpeckleSimpleInfo( string name )
|
||||
{
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public string name { get; }
|
||||
|
||||
}
|
||||
|
||||
public static class Ayuda {
|
||||
|
||||
public static void SyncCall( SendOrPostCallback post ) => SynchronizationContext.Current.Post( post, null );
|
||||
|
||||
public static void ExecuteContinuations( )
|
||||
{
|
||||
var context = SynchronizationContext.Current;
|
||||
var execMethod = context.GetType( ).GetMethod( "Exec", BindingFlags.NonPublic | BindingFlags.Instance );
|
||||
execMethod.Invoke( context, null );
|
||||
}
|
||||
|
||||
public static List<SpeckleSimpleInfo> GetInfo( this IEnumerable<Stream> input )
|
||||
{
|
||||
return (
|
||||
from i in input
|
||||
where i != null
|
||||
select new SpeckleSimpleInfo( i.name ) ).ToList( );
|
||||
}
|
||||
|
||||
public static List<SpeckleSimpleInfo> GetInfo( this IEnumerable<Branch> input )
|
||||
{
|
||||
return (
|
||||
from i in input
|
||||
where i != null
|
||||
select new SpeckleSimpleInfo( i.name ) ).ToList( );
|
||||
}
|
||||
|
||||
public static List<SpeckleSimpleInfo> GetInfo( this IEnumerable<Commit> input )
|
||||
{
|
||||
return (
|
||||
from i in input
|
||||
where i != null
|
||||
select new SpeckleSimpleInfo( i.id ) ).ToList( );
|
||||
}
|
||||
public static IEnumerable<string> GetNames( this IEnumerable<Account> accounts )
|
||||
{
|
||||
List<string> names = new List<string>( );
|
||||
if ( accounts != null ) {
|
||||
names.AddRange(
|
||||
from account in accounts
|
||||
where account != null
|
||||
select account.userInfo.name
|
||||
);
|
||||
}
|
||||
return names;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,277 +0,0 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using Speckle.Core.Api;
|
||||
using Speckle.Core.Credentials;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Speckle_Connector.dmo;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Events;
|
||||
|
||||
namespace Speckle.ConnectorUnity {
|
||||
[ExecuteAlways]
|
||||
[RequireComponent( typeof( Dispatcher ) )]
|
||||
public class BabyStreamManager : MonoBehaviour {
|
||||
|
||||
[Header( "|| Speckle Account Stuff ||" )]
|
||||
[Tooltip( "WIP - If working from Editor use a scriptable object to import streams" ),
|
||||
SerializeField] private StreamSO streamObj;
|
||||
|
||||
private List<Receiver> ActiveReceivers;
|
||||
private UnityEvent<GameObject> StreamObjectLoadedEvent;
|
||||
|
||||
public int ListLimit { get; set; }
|
||||
|
||||
public Account Account {
|
||||
get => Stash.Account;
|
||||
set => Stash.Account = value;
|
||||
}
|
||||
|
||||
public Stream SelectedStream {
|
||||
get => Stash.SelectedStream;
|
||||
set => Stash.SelectedStream = value;
|
||||
}
|
||||
|
||||
public List<Stream> Streams {
|
||||
get => Stash.Streams;
|
||||
set => Stash.Streams = value;
|
||||
}
|
||||
|
||||
public List<Branch> Branches {
|
||||
get => Stash.Branches;
|
||||
set => Stash.Branches = value;
|
||||
}
|
||||
|
||||
public List<Commit> Commits {
|
||||
get => Stash.Commits;
|
||||
set => Stash.Commits = value;
|
||||
}
|
||||
|
||||
private Fetcher _fetcher;
|
||||
public Fetcher Fetch {
|
||||
get {
|
||||
_fetcher ??= new Fetcher( this );
|
||||
return _fetcher;
|
||||
}
|
||||
}
|
||||
|
||||
public bool AutoUpdate { get; set; }
|
||||
public bool InProcess { get; set; }
|
||||
|
||||
public bool StreamReady => SelectedStream != null;
|
||||
|
||||
public bool IsReady => Account != null && Streams?.Count > 0 && Branches?.Count > 0;
|
||||
|
||||
private Dispatcher Dispatcher {
|
||||
get {
|
||||
// NOTE required for converting and setting up files
|
||||
if ( Dispatcher.Instance == null && gameObject.GetComponent<Dispatcher>( ) == null )
|
||||
gameObject.AddComponent<Dispatcher>( );
|
||||
|
||||
return Dispatcher.Instance;
|
||||
}
|
||||
}
|
||||
|
||||
private int _selectedStreamIndex, _selectedBranchIndex, _selectedCommitIndex;
|
||||
|
||||
public int SetSelectedBranch {
|
||||
set {
|
||||
if ( Branches != null )
|
||||
_selectedBranchIndex = SetIndex( value, Fetch.BranchesByName );
|
||||
}
|
||||
}
|
||||
|
||||
public int SetSelectedCommit {
|
||||
set {
|
||||
if ( Commits != null )
|
||||
_selectedCommitIndex = SetIndex( value, Fetch.CommitsById );
|
||||
}
|
||||
}
|
||||
|
||||
public async void SelectStreamFromList( int value )
|
||||
{
|
||||
if ( Streams == null ) return;
|
||||
|
||||
ClearSelectedStreamData( );
|
||||
|
||||
_selectedStreamIndex = SetIndex( value, Fetch.StreamsByName );
|
||||
|
||||
var selectedStream = Streams[ _selectedStreamIndex ];
|
||||
|
||||
if ( Account == null ) {
|
||||
Debug.Log( "No account set to pull from :(" );
|
||||
return;
|
||||
}
|
||||
|
||||
if ( selectedStream == null ) {
|
||||
Debug.Log( "No Stream to Select from ya fool!" );
|
||||
return;
|
||||
}
|
||||
|
||||
var client = new Client( Account );
|
||||
|
||||
var branches = await client.StreamGetBranches( selectedStream.id );
|
||||
Branches = branches;
|
||||
|
||||
var commits = await client.StreamGetCommits( selectedStream.id );
|
||||
Commits = commits;
|
||||
|
||||
SelectedStream = selectedStream;
|
||||
}
|
||||
|
||||
private static int SetIndex( int index, ICollection objects )
|
||||
{
|
||||
if ( objects != null ) {
|
||||
if ( index >= objects.Count )
|
||||
index = objects.Count - 1;
|
||||
else if ( index < 0 )
|
||||
index = 0;
|
||||
}
|
||||
return index;
|
||||
}
|
||||
|
||||
internal static class Stash {
|
||||
|
||||
public static Account Account { get; internal set; }
|
||||
|
||||
public static Stream SelectedStream { get; internal set; }
|
||||
|
||||
public static List<Stream> Streams { get; internal set; }
|
||||
|
||||
public static List<Branch> Branches { get; internal set; }
|
||||
|
||||
public static List<Commit> Commits { get; internal set; }
|
||||
|
||||
}
|
||||
|
||||
public class Fetcher {
|
||||
|
||||
public Fetcher( BabyStreamManager manager )
|
||||
{
|
||||
Manager = manager;
|
||||
}
|
||||
|
||||
public string AccountName {
|
||||
get {
|
||||
var value = "nada";
|
||||
if ( Manager?.Account != null )
|
||||
value = Manager.Account.userInfo.name;
|
||||
return value;
|
||||
}
|
||||
}
|
||||
|
||||
public string ServerName {
|
||||
get {
|
||||
var value = "nada";
|
||||
if ( Manager?.Account != null )
|
||||
value = Manager.Account.serverInfo.name;
|
||||
return value;
|
||||
}
|
||||
}
|
||||
|
||||
public string ServerURL {
|
||||
get {
|
||||
var value = "nada";
|
||||
if ( Manager?.Account != null )
|
||||
value = Manager.Account.serverInfo.url;
|
||||
return value;
|
||||
}
|
||||
}
|
||||
|
||||
public IEnumerable<Account> Accounts => AccountManager.GetAccounts( );
|
||||
|
||||
public List<string> BranchesByName => GetByName( Manager?.Branches.GetInfo( ) );
|
||||
|
||||
public List<string> StreamsByName => GetByName( Manager?.Streams.GetInfo( ) );
|
||||
|
||||
public List<string> CommitsById => GetByName( Manager?.Commits.GetInfo( ) );
|
||||
|
||||
private static List<string> GetByName( IReadOnlyCollection<SpeckleSimpleInfo> list )
|
||||
{
|
||||
var names = new List<string>( );
|
||||
|
||||
if ( list != null && list.Count > 0 )
|
||||
names = ( from i in list select i.name ).ToList( );
|
||||
|
||||
return names;
|
||||
}
|
||||
|
||||
private BabyStreamManager Manager { get; }
|
||||
|
||||
private bool DispatcherActive => Manager?.Dispatcher != null;
|
||||
|
||||
public int SelectedStreamIndex => Manager == null ? 0 : Manager._selectedStreamIndex;
|
||||
|
||||
}
|
||||
|
||||
public async void GetSpeckleAccountData( )
|
||||
{
|
||||
InProcess = false;
|
||||
var speckleAccount = AccountManager.GetAccounts( ).FirstOrDefault( );
|
||||
|
||||
if ( speckleAccount == null ) {
|
||||
Debug.Log( "Please set a default account in SpeckleManager" );
|
||||
return;
|
||||
}
|
||||
|
||||
Account = speckleAccount;
|
||||
|
||||
ClearData( true );
|
||||
var client = new Client( Account );
|
||||
|
||||
var streams = await client.StreamsGet( ListLimit );
|
||||
|
||||
Streams = streams;
|
||||
}
|
||||
|
||||
private void ClearData( bool BranchesAndStreams )
|
||||
{
|
||||
Streams = new List<Stream>( );
|
||||
if ( !BranchesAndStreams ) return;
|
||||
|
||||
ClearSelectedStreamData( );
|
||||
}
|
||||
|
||||
private void ClearSelectedStreamData( )
|
||||
{
|
||||
SelectedStream = null;
|
||||
Branches = new List<Branch>( );
|
||||
Commits = new List<Commit>( );
|
||||
}
|
||||
|
||||
public void LoadStream( )
|
||||
{
|
||||
if ( Account == null ) {
|
||||
Debug.Log( "No account set to pull from :(" );
|
||||
return;
|
||||
}
|
||||
|
||||
if ( SelectedStream == null ) {
|
||||
Debug.Log( "No Stream to Select from ya fool!" );
|
||||
return;
|
||||
}
|
||||
|
||||
var branchName = Fetch.BranchesByName[ _selectedBranchIndex ];
|
||||
|
||||
var instance = new GameObject( $"{branchName} Receiver" ).AddComponent<Receiver>( );
|
||||
|
||||
instance.Init( SelectedStream.id, AutoUpdate, false, Account,
|
||||
onDataReceivedAction: go => {
|
||||
go.transform.SetParent( instance.transform );
|
||||
StreamObjectLoadedEvent?.Invoke( go );
|
||||
},
|
||||
onTotalChildrenCountKnown: count => { instance.TotalChildrenCount = count; },
|
||||
onProgressAction: dict => { Dispatcher.Enqueue( ( ) => { Debug.Log( dict.Values.Average( ) / instance.TotalChildrenCount ); } ); } );
|
||||
|
||||
instance.ReceiveCompleteAction += ( ) => { Debug.Log( "Receive Complete" ); };
|
||||
|
||||
instance.Receive( branchName );
|
||||
|
||||
ActiveReceivers ??= new List<Receiver>( );
|
||||
ActiveReceivers.Add( instance );
|
||||
InProcess = false;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Speckle.ConnectorUnity {
|
||||
public abstract class SpeckleUnityEventArgs : EventArgs { }
|
||||
|
||||
public class StreamSelectedArgs : EventArgs {
|
||||
|
||||
public StreamSelectedArgs( List<string> branchNames, List<string> commitIds )
|
||||
{
|
||||
BranchNames = branchNames;
|
||||
CommitIds = commitIds;
|
||||
}
|
||||
|
||||
public List<string> BranchNames { get; }
|
||||
public List<string> CommitIds { get; }
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
#if UNITY_EDITOR
|
||||
using UnityEditor;
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#if UNITY_EDITOR
|
||||
#endif
|
||||
|
||||
[CustomPropertyDrawer( typeof( ReadOnlyAttribute ) )]
|
||||
public class ReadOnlyDrawer : PropertyDrawer {
|
||||
|
||||
public override void OnGUI( Rect position,
|
||||
SerializedProperty property,
|
||||
GUIContent label )
|
||||
{
|
||||
GUI.enabled = false;
|
||||
EditorGUI.PropertyField( position, property, label, true );
|
||||
GUI.enabled = true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public class ReadOnlyAttribute : PropertyAttribute { }
|
||||
@@ -1,7 +0,0 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
[CreateAssetMenu( fileName = "SpeckleStream", menuName = "Speckle2/Stream Scriptable Object", order = 0 )]
|
||||
public class AccountSO : ScriptableObject
|
||||
{
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace Speckle_Connector.dmo {
|
||||
[CreateAssetMenu( fileName = "SpeckleStream", menuName = "Speckle2/Stream Scriptable Object", order = 0 )]
|
||||
|
||||
public class StreamSO : ScriptableObject {
|
||||
|
||||
public string streamId;
|
||||
public string streamName;
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
%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: 11500000, guid: 4c2110f382384646afeb0ebe0b2109f0, type: 3}
|
||||
m_Name: SpeckleStream
|
||||
m_EditorClassIdentifier:
|
||||
streamId:
|
||||
streamName:
|
||||
+113
-112
@@ -1,3 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using Speckle.Core.Credentials;
|
||||
@@ -8,124 +9,124 @@ using Stream = Speckle.Core.Api.Stream;
|
||||
|
||||
namespace Speckle.ConnectorUnity
|
||||
{
|
||||
public class SpeckleExamples : MonoBehaviour
|
||||
{
|
||||
public Text SelectStreamText;
|
||||
public Text DetailsStreamText;
|
||||
public Dropdown StreamSelectionDropdown;
|
||||
public Button AddReceiverBtn;
|
||||
public Toggle AutoReceiveToggle;
|
||||
public Button AddSenderBtn;
|
||||
public GameObject StreamPrefab;
|
||||
public Canvas StreamsCanvas;
|
||||
|
||||
private List<Stream> StreamList = null;
|
||||
private Stream SelectedStream = null;
|
||||
private List<GameObject> StreamPrefabs = new List<GameObject>();
|
||||
|
||||
async void Start()
|
||||
[Obsolete]
|
||||
public class SpeckleExamples : MonoBehaviour
|
||||
{
|
||||
if (SelectStreamText == null || StreamSelectionDropdown == null)
|
||||
{
|
||||
Debug.Log("Please set all input fields on _SpeckleExamples");
|
||||
return;
|
||||
}
|
||||
public Text SelectStreamText;
|
||||
public Text DetailsStreamText;
|
||||
public Dropdown StreamSelectionDropdown;
|
||||
public Button AddReceiverBtn;
|
||||
public Toggle AutoReceiveToggle;
|
||||
public Button AddSenderBtn;
|
||||
public GameObject StreamPanel;
|
||||
public Canvas StreamsCanvas;
|
||||
|
||||
var defaultAccount = AccountManager.GetDefaultAccount();
|
||||
if (defaultAccount == null)
|
||||
{
|
||||
Debug.Log("Please set a default account in SpeckleManager");
|
||||
return;
|
||||
}
|
||||
private List<Stream> StreamList = null;
|
||||
private Stream SelectedStream = null;
|
||||
private List<GameObject> StreamPanels = new List<GameObject>();
|
||||
|
||||
SelectStreamText.text = $"Select a stream on {defaultAccount.serverInfo.name}:";
|
||||
async void Start()
|
||||
{
|
||||
if (SelectStreamText == null || StreamSelectionDropdown == null)
|
||||
{
|
||||
Debug.Log("Please set all input fields on _SpeckleExamples");
|
||||
return;
|
||||
}
|
||||
|
||||
StreamList = await Streams.List();
|
||||
if (!StreamList.Any())
|
||||
{
|
||||
Debug.Log("There are no streams in your account, please create one online.");
|
||||
return;
|
||||
}
|
||||
var defaultAccount = AccountManager.GetDefaultAccount();
|
||||
if (defaultAccount == null)
|
||||
{
|
||||
Debug.Log("Please set a default account in SpeckleManager");
|
||||
return;
|
||||
}
|
||||
|
||||
StreamSelectionDropdown.options.Clear();
|
||||
foreach (var stream in StreamList)
|
||||
{
|
||||
StreamSelectionDropdown.options.Add(new Dropdown.OptionData(stream.name + " - " + stream.id));
|
||||
}
|
||||
SelectStreamText.text = $"Select a stream on {defaultAccount.serverInfo.name}:";
|
||||
|
||||
StreamSelectionDropdown.onValueChanged.AddListener(StreamSelectionChanged);
|
||||
//trigger ui refresh, maybe there's a better method
|
||||
StreamSelectionDropdown.value = -1;
|
||||
StreamSelectionDropdown.value = 0;
|
||||
StreamList = await Streams.List(30);
|
||||
if (!StreamList.Any())
|
||||
{
|
||||
Debug.Log("There are no streams in your account, please create one online.");
|
||||
return;
|
||||
}
|
||||
|
||||
StreamSelectionDropdown.options.Clear();
|
||||
foreach (var stream in StreamList)
|
||||
{
|
||||
StreamSelectionDropdown.options.Add(
|
||||
new Dropdown.OptionData(stream.name + " - " + stream.id)
|
||||
);
|
||||
}
|
||||
|
||||
AddReceiverBtn.onClick.AddListener(AddReceiver);
|
||||
AddSenderBtn.onClick.AddListener(AddSender);
|
||||
StreamSelectionDropdown.onValueChanged.AddListener(StreamSelectionChanged);
|
||||
//trigger ui refresh, maybe there's a better method
|
||||
StreamSelectionDropdown.value = -1;
|
||||
StreamSelectionDropdown.value = 0;
|
||||
|
||||
AddReceiverBtn.onClick.AddListener(AddReceiver);
|
||||
AddSenderBtn.onClick.AddListener(AddSender);
|
||||
}
|
||||
|
||||
public void StreamSelectionChanged(int index)
|
||||
{
|
||||
if (index == -1)
|
||||
return;
|
||||
|
||||
SelectedStream = StreamList[index];
|
||||
DetailsStreamText.text =
|
||||
$"Description: {SelectedStream.description}\n"
|
||||
+ $"Link sharing on: {SelectedStream.isPublic}\n"
|
||||
+ $"Role: {SelectedStream.role}\n"
|
||||
+ $"Collaborators: {SelectedStream.collaborators.Count}\n"
|
||||
+ $"Id: {SelectedStream.id}";
|
||||
}
|
||||
|
||||
// Shows how to create a new Receiver from code and then pull data manually
|
||||
// Created receivers are added to a List of Receivers for future use
|
||||
private async void AddReceiver()
|
||||
{
|
||||
var autoReceive = AutoReceiveToggle.isOn;
|
||||
var stream = await Streams.Get(SelectedStream.id, 30);
|
||||
|
||||
var streamPrefab = Instantiate(StreamPanel, new Vector3(0, 0, 0), Quaternion.identity);
|
||||
|
||||
//set position
|
||||
streamPrefab.transform.SetParent(StreamsCanvas.transform);
|
||||
var rt = streamPrefab.GetComponent<RectTransform>();
|
||||
rt.anchoredPosition = new Vector3(-10, -110 - StreamPanels.Count * 110, 0);
|
||||
|
||||
streamPrefab.AddComponent<InteractionLogic>().InitReceiver(stream, autoReceive);
|
||||
|
||||
StreamPanels.Add(streamPrefab);
|
||||
}
|
||||
|
||||
private async void AddSender()
|
||||
{
|
||||
var stream = await Streams.Get(SelectedStream.id, 10);
|
||||
|
||||
var streamPrefab = Instantiate(StreamPanel, new Vector3(0, 0, 0), Quaternion.identity);
|
||||
|
||||
streamPrefab.transform.SetParent(StreamsCanvas.transform);
|
||||
var rt = streamPrefab.GetComponent<RectTransform>();
|
||||
rt.anchoredPosition = new Vector3(-10, -110 - StreamPanels.Count * 110, 0);
|
||||
|
||||
streamPrefab.AddComponent<InteractionLogic>().InitSender(stream);
|
||||
|
||||
StreamPanels.Add(streamPrefab);
|
||||
}
|
||||
|
||||
public void RemoveStreamPrefab(GameObject streamPrefab)
|
||||
{
|
||||
StreamPanels.RemoveAt(StreamPanels.FindIndex(x => x.name == streamPrefab.name));
|
||||
ReorderStreamPrefabs();
|
||||
}
|
||||
|
||||
private void ReorderStreamPrefabs()
|
||||
{
|
||||
for (var i = 0; i < StreamPanels.Count; i++)
|
||||
{
|
||||
var rt = StreamPanels[i].GetComponent<RectTransform>();
|
||||
rt.anchoredPosition = new Vector3(-10, -110 - i * 110, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void StreamSelectionChanged(int index)
|
||||
{
|
||||
if (index == -1)
|
||||
return;
|
||||
|
||||
SelectedStream = StreamList[index];
|
||||
DetailsStreamText.text =
|
||||
$"Description: {SelectedStream.description}\n" +
|
||||
$"Link sharing on: {SelectedStream.isPublic}\n" +
|
||||
$"Role: {SelectedStream.role}\n" +
|
||||
$"Collaborators: {SelectedStream.collaborators.Count}\n" +
|
||||
$"Id: {SelectedStream.id}";
|
||||
}
|
||||
|
||||
// Shows how to create a new Receiver from code and then pull data manually
|
||||
// Created receivers are added to a List of Receivers for future use
|
||||
private async void AddReceiver()
|
||||
{
|
||||
var autoReceive = AutoReceiveToggle.isOn;
|
||||
var stream = await Streams.Get(SelectedStream.id, 10);
|
||||
|
||||
var streamPrefab = Instantiate(StreamPrefab, new Vector3(0, 0, 0),
|
||||
Quaternion.identity);
|
||||
|
||||
//set position
|
||||
streamPrefab.transform.SetParent(StreamsCanvas.transform);
|
||||
var rt = streamPrefab.GetComponent<RectTransform>();
|
||||
rt.anchoredPosition = new Vector3(-10, -110 - StreamPrefabs.Count * 110, 0);
|
||||
|
||||
streamPrefab.AddComponent<InteractionLogic>().InitReceiver(stream, autoReceive);
|
||||
|
||||
StreamPrefabs.Add(streamPrefab);
|
||||
}
|
||||
|
||||
private async void AddSender()
|
||||
{
|
||||
var stream = await Streams.Get(SelectedStream.id, 10);
|
||||
|
||||
var streamPrefab = Instantiate(StreamPrefab, new Vector3(0, 0, 0),
|
||||
Quaternion.identity);
|
||||
|
||||
streamPrefab.transform.SetParent(StreamsCanvas.transform);
|
||||
var rt = streamPrefab.GetComponent<RectTransform>();
|
||||
rt.anchoredPosition = new Vector3(-10, -110 - StreamPrefabs.Count * 110, 0);
|
||||
|
||||
streamPrefab.AddComponent<InteractionLogic>().InitSender(stream);
|
||||
|
||||
StreamPrefabs.Add(streamPrefab);
|
||||
}
|
||||
|
||||
public void RemoveStreamPrefab(GameObject streamPrefab)
|
||||
{
|
||||
StreamPrefabs.RemoveAt(StreamPrefabs.FindIndex(x => x.name == streamPrefab.name));
|
||||
ReorderStreamPrefabs();
|
||||
}
|
||||
|
||||
private void ReorderStreamPrefabs()
|
||||
{
|
||||
for (var i = 0; i < StreamPrefabs.Count; i++)
|
||||
{
|
||||
var rt = StreamPrefabs[i].GetComponent<RectTransform>();
|
||||
rt.anchoredPosition = new Vector3(-10, -110 - i * 110, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+439
-991
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 17672c7479cd1f64c85c42d113e8ad95
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
Binary file not shown.
@@ -28,6 +28,7 @@ RectTransform:
|
||||
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_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 3452469119923756171}
|
||||
m_RootOrder: 0
|
||||
@@ -103,6 +104,7 @@ RectTransform:
|
||||
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_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 1187114122788282811}
|
||||
m_RootOrder: 3
|
||||
@@ -183,6 +185,7 @@ RectTransform:
|
||||
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_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 6020342713586502030}
|
||||
m_Father: {fileID: 7556766085298809888}
|
||||
@@ -308,6 +311,7 @@ RectTransform:
|
||||
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_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 3140626913919314916}
|
||||
m_RootOrder: 1
|
||||
@@ -383,6 +387,7 @@ RectTransform:
|
||||
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_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 102303468818191937}
|
||||
m_RootOrder: 0
|
||||
@@ -463,6 +468,7 @@ RectTransform:
|
||||
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_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 603356138192389748}
|
||||
m_Father: {fileID: 7556766085298809888}
|
||||
@@ -552,6 +558,7 @@ RectTransform:
|
||||
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_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 3140626913919314916}
|
||||
m_RootOrder: 0
|
||||
@@ -629,6 +636,7 @@ RectTransform:
|
||||
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_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 3452469119923756171}
|
||||
m_Father: {fileID: 2443777670835029483}
|
||||
@@ -667,6 +675,7 @@ RectTransform:
|
||||
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_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 8259817509940803332}
|
||||
m_RootOrder: 0
|
||||
@@ -726,7 +735,7 @@ GameObject:
|
||||
- component: {fileID: 2100176054962759916}
|
||||
- component: {fileID: 254853880357269643}
|
||||
m_Layer: 5
|
||||
m_Name: StreamPanel 1
|
||||
m_Name: StreamPanel
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
@@ -742,6 +751,7 @@ RectTransform:
|
||||
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_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 102303468818191937}
|
||||
- {fileID: 3140626913919314916}
|
||||
@@ -823,6 +833,7 @@ RectTransform:
|
||||
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_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 2443777670835029483}
|
||||
- {fileID: 4467957676443937226}
|
||||
@@ -931,6 +942,7 @@ RectTransform:
|
||||
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_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 7392037013616821269}
|
||||
- {fileID: 8259817509940803332}
|
||||
@@ -1063,6 +1075,7 @@ RectTransform:
|
||||
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_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 5702098015768582807}
|
||||
- {fileID: 6679144287931550080}
|
||||
@@ -1153,6 +1166,7 @@ RectTransform:
|
||||
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_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 3452469119923756171}
|
||||
m_RootOrder: 2
|
||||
@@ -1233,6 +1247,7 @@ RectTransform:
|
||||
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_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 2052973192117566328}
|
||||
m_Father: {fileID: 1187114122788282811}
|
||||
@@ -1321,7 +1336,7 @@ MonoBehaviour:
|
||||
m_SelectedTrigger: Selected
|
||||
m_DisabledTrigger: Disabled
|
||||
m_Interactable: 1
|
||||
m_TargetGraphic: {fileID: 0}
|
||||
m_TargetGraphic: {fileID: 7169743734853655954}
|
||||
m_OnClick:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
@@ -1353,6 +1368,7 @@ RectTransform:
|
||||
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_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 2617971973288675133}
|
||||
m_RootOrder: 0
|
||||
@@ -1432,6 +1448,7 @@ RectTransform:
|
||||
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_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 3452469119923756171}
|
||||
m_RootOrder: 1
|
||||
@@ -1507,6 +1524,7 @@ RectTransform:
|
||||
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_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 6679144287931550080}
|
||||
m_RootOrder: 0
|
||||
@@ -1580,6 +1598,7 @@ RectTransform:
|
||||
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_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 4127142461058788395}
|
||||
m_Father: {fileID: 8259817509940803332}
|
||||
@@ -1618,6 +1637,7 @@ RectTransform:
|
||||
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_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 1187114122788282811}
|
||||
m_RootOrder: 2
|
||||
@@ -1698,6 +1718,7 @@ RectTransform:
|
||||
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_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 4559588495107889264}
|
||||
m_Father: {fileID: 4467957676443937226}
|
||||
@@ -1735,6 +1756,7 @@ RectTransform:
|
||||
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_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 5904362841980777272}
|
||||
- {fileID: 4621970763822558170}
|
||||
@@ -1823,6 +1845,7 @@ RectTransform:
|
||||
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_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 6020342713586502030}
|
||||
m_RootOrder: 0
|
||||
@@ -1899,6 +1922,7 @@ RectTransform:
|
||||
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_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 817718653825013287}
|
||||
- {fileID: 8018867261834699774}
|
||||
@@ -1908,8 +1932,8 @@ RectTransform:
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 146.5, y: -62.2}
|
||||
m_SizeDelta: {x: 122.9, y: 30}
|
||||
m_AnchoredPosition: {x: 128.64221, y: -62.2}
|
||||
m_SizeDelta: {x: 158.6156, y: 30}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &8298570900796106430
|
||||
CanvasRenderer:
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 56efeb256feb62a4f9822d61f43c9abf
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1c4866de6945b724e94ffe464939d914
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 890dd72b062bca74591b5e697dd9f2e9
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user