Skip to content

Commit

Permalink
Merge pull request #254 from xBambusekD/master
Browse files Browse the repository at this point in the history
Fixes for collaboration experiment
  • Loading branch information
ZdenekM authored Mar 27, 2024
2 parents 5e29bb8 + 888d380 commit ef4f1bd
Show file tree
Hide file tree
Showing 27 changed files with 1,831 additions and 394 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
[Mm]emoryCaptures/
/arcor2_AREditor/[Uu]ser[Ss]ettings/
/arcor2_AREditor/[Aa]ssets/[Ss]ubmodules*
/arcor2_AREditor/Assets/ExtensionsAssets/
/arcor2_AREditor/[Aa]ssets/[Pp]lugins*
/arcor2_AREditor/[Pp]ackages*

# Never ignore Asset meta data
!/[Aa]ssets/**/*.meta
Expand Down
9 changes: 5 additions & 4 deletions arcor2_AREditor/Assets/BASE/Scripts/Action.cs
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,11 @@ private void ShowOutputTypeDialog(UnityAction callback)

private async Task CreateNewConnection()
{

if (!await WriteLock(false)) {
return;
}

ConnectionManagerArcoro.Instance.CreateConnectionToPointer(Output.gameObject);

await GameManager.Instance.RequestObject(GameManager.EditorStateEnum.SelectingAction, GetOtherAction,
Expand Down Expand Up @@ -325,10 +330,6 @@ public async Task SelectedConnection(LogicItem logicItem)
GameManager.Instance.ShowLoadingScreen("Removing old connection...");
await WebsocketManager.Instance.RemoveLogicItem(logicItem.Data.Id);
GameManager.Instance.HideLoadingScreen();
if (!await otherAction.WriteLock(false))
{
return;
}
AddConnection();

}
Expand Down
2 changes: 1 addition & 1 deletion arcor2_AREditor/Assets/BASE/Scripts/EndAction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public override void Init(IO.Swagger.Model.Action projectAction, Base.ActionMeta
parameters: new List<IO.Swagger.Model.ActionParameter>(),
type: "");
base.Init(prAction, metadata, ap, actionProvider, keySuffix);
transform.localPosition = PlayerPrefsHelper.LoadVector3(playerPrefsKey, new Vector3(0, 0.1f, 0));
transform.localPosition = PlayerPrefsHelper.LoadVector3(playerPrefsKey, new Vector3(0, 0.1f, 0.6f));
//Input.SelectorItem = SelectorMenu.Instance.CreateSelectorItem(Input);
}

Expand Down
2 changes: 2 additions & 0 deletions arcor2_AREditor/Assets/BASE/Scripts/LockingEventsCache.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ public class LockingEventsCache : Singleton<LockingEventsCache> {
/// Invoked when an object is locked or unlocked
/// </summary>
public event AREditorEventArgs.ObjectLockingEventHandler OnObjectLockingEvent;
public event AREditorEventArgs.StringEventHandler OnAfterObjectLockingEvent;
private bool canInvoke = false;
private bool wasAppKilled = true;
private bool arOn = false;
Expand Down Expand Up @@ -69,6 +70,7 @@ public void Add(ObjectLockingEventArgs objectsLockingEvent) {
}
}
InvokeEvents();
OnAfterObjectLockingEvent?.Invoke(this, new StringEventArgs(""));
}


Expand Down
2 changes: 1 addition & 1 deletion arcor2_AREditor/Assets/BASE/Scripts/StartAction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public override void Init(IO.Swagger.Model.Action projectAction, Base.ActionMeta
parameters: new List<IO.Swagger.Model.ActionParameter>(),
type: "");
base.Init(prAction, metadata, ap, actionProvider, actionType);
transform.localPosition = PlayerPrefsHelper.LoadVector3(playerPrefsKey, new Vector3(0, 0.15f, 0));
transform.localPosition = PlayerPrefsHelper.LoadVector3(playerPrefsKey, new Vector3(0, 0.15f, -0.6f));
// Output.SelectorItem = SelectorMenu.Instance.CreateSelectorItem(Output);
}

Expand Down
Binary file modified arcor2_AREditor/Assets/BASE/Scripts/Swagger/IO.Swagger.dll
Binary file not shown.
10 changes: 8 additions & 2 deletions arcor2_AREditor/Assets/TABLET/Materials/ActionPointMaterial.mat
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,24 @@
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: ActionPointMaterial
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
m_ShaderKeywords:
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
Expand Down Expand Up @@ -55,6 +59,7 @@ Material:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _BumpScale: 1
- _Cutoff: 0.5
Expand All @@ -75,3 +80,4 @@ Material:
m_Colors:
- _Color: {r: 0.51, g: 0.51, b: 0.89, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
m_BuildTextureStacks: []
Loading

0 comments on commit ef4f1bd

Please sign in to comment.