attempted fix for macos editor not picking up core DLL
This commit is contained in:
@@ -1,45 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Speckle.ConnectorUnity;
|
||||
using UnityEngine;
|
||||
|
||||
[RequireComponent(typeof(SpeckleProperties)), ExecuteAlways]
|
||||
public class SpecklePropertiesViewer : MonoBehaviour, ISerializationCallbackReceiver
|
||||
{
|
||||
[SerializeField]
|
||||
private List<KVP> Data;
|
||||
|
||||
[SerializeField]
|
||||
private int count;
|
||||
|
||||
private SpeckleProperties properties;
|
||||
public void Awake()
|
||||
{
|
||||
properties = GetComponent<SpeckleProperties>();
|
||||
}
|
||||
|
||||
public void OnBeforeSerialize()
|
||||
{
|
||||
Data = properties.Data.Select(x => new KVP(x.Key.ToString(), x.Value?.ToString())).ToList();
|
||||
|
||||
count = properties.Data.Count;
|
||||
}
|
||||
|
||||
public void OnAfterDeserialize()
|
||||
{
|
||||
Data.Clear();
|
||||
}
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
struct KVP
|
||||
{
|
||||
public string key, value;
|
||||
|
||||
public KVP(string k, string v)
|
||||
{
|
||||
key = k;
|
||||
value = v;
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d6e625eb3c7bf324eb113aadb026a201
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,87 +0,0 @@
|
||||
using System;
|
||||
using Speckle.ConnectorUnity;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using Object = UnityEngine.Object;
|
||||
|
||||
//Serialized wrapper around a Base object
|
||||
[RequireComponent(typeof(SpeckleProperties)), ExecuteAlways]
|
||||
public class SpeckleObject : MonoBehaviour, ISerializationCallbackReceiver
|
||||
{
|
||||
|
||||
private SpeckleProperties properties;
|
||||
public void Awake()
|
||||
{
|
||||
properties = GetComponent<SpeckleProperties>();
|
||||
}
|
||||
|
||||
public void OnBeforeSerialize()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void OnAfterDeserialize()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
void OnGUI()
|
||||
{
|
||||
GUILayout.Label("Value: ");
|
||||
foreach (var kvp in properties.Data)
|
||||
{
|
||||
//var newKey = GUILayout.TextField(kvp.Key, GUILayout.rea);
|
||||
GUILayout.Label(kvp.Key);
|
||||
var existingValue = kvp.Value;
|
||||
var newValue = CreateField(kvp.Value);
|
||||
|
||||
if(newValue != existingValue)
|
||||
properties.Data[kvp.Key] = newValue;
|
||||
|
||||
GUILayout.Space(10);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private static object CreateField(object v)
|
||||
{
|
||||
const string label = "Value";
|
||||
GUILayoutOption[] options = { GUILayout.ExpandWidth(true) };
|
||||
|
||||
return v switch
|
||||
{
|
||||
int i => EditorGUILayout.IntField(i, options),
|
||||
long l => EditorGUILayout.LongField(l, options),
|
||||
float f => EditorGUILayout.FloatField(f, options),
|
||||
double d => EditorGUILayout.DoubleField(d, options),
|
||||
string s => EditorGUILayout.TextField(s, options),
|
||||
bool b => GUILayout.Toggle(b, label, options),
|
||||
Enum e => EditorGUILayout.EnumPopup(e, options),
|
||||
Object o => EditorGUILayout.ObjectField(label, o, o.GetType(), true, options),
|
||||
_ => v
|
||||
};
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
// public class SpeckleObject<T> : SpeckleObject where T : Base
|
||||
// {
|
||||
//
|
||||
// public SpeckleObject(T value)
|
||||
// : base(value)
|
||||
// {
|
||||
//
|
||||
// }
|
||||
// //What I want this to look like
|
||||
// /*
|
||||
// * SubclassOf<Base> SpeckleType; //enforced type
|
||||
// * int area
|
||||
// * int prop... //explicit props defined here
|
||||
// * Map<string, object> DynamicProps...
|
||||
// *
|
||||
// */
|
||||
//
|
||||
//
|
||||
// }
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7bb07d1449c8af34c8531fc28e235d33
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ce81e5a5736f823438609569e7ff3d83
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 84a088f07f8c2e94b82b01c307a2c122
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
@@ -1,96 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e942b66bab168a34cacdb027f02d3245
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 11
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 1
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 0
|
||||
wrapV: 0
|
||||
wrapW: 0
|
||||
nPOTScale: 1
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 0
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 100
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 0
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 0
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 3
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID:
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
spritePackingTag:
|
||||
pSDRemoveMatte: 0
|
||||
pSDShowRemoveMatteOption: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -47,7 +47,7 @@ PluginImporter:
|
||||
second:
|
||||
enabled: 1
|
||||
settings:
|
||||
CPU: x86_64
|
||||
CPU: AnyCPU
|
||||
- first:
|
||||
Standalone: OSXUniversal
|
||||
second:
|
||||
|
||||
@@ -14,16 +14,16 @@ namespace Speckle.ConnectorUnity
|
||||
#elif UNITY_2021
|
||||
return HostAppVersion.v2021;
|
||||
#elif UNITY_2022
|
||||
return HostAppVersion.v202;
|
||||
return HostAppVersion.v2022;
|
||||
#elif UNITY_2023
|
||||
return HostAppVersion.v2023;
|
||||
#elif UNITY_2024
|
||||
return HostAppVersion.v2024;
|
||||
#elif UNITY_2025
|
||||
return HostAppVersion.v2025;
|
||||
#endif
|
||||
|
||||
#else
|
||||
return HostAppVersion.v;
|
||||
#endif
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -5,8 +5,10 @@
|
||||
"includePlatforms": [],
|
||||
"excludePlatforms": [],
|
||||
"allowUnsafeCode": false,
|
||||
"overrideReferences": false,
|
||||
"precompiledReferences": [],
|
||||
"overrideReferences": true,
|
||||
"precompiledReferences": [
|
||||
"SpeckleCore2.dll"
|
||||
],
|
||||
"autoReferenced": true,
|
||||
"defineConstraints": [],
|
||||
"versionDefines": [],
|
||||
|
||||
Reference in New Issue
Block a user