diff --git a/Assets/Resources/Prefabs/Ray.prefab b/Assets/Resources/Prefabs/Ray.prefab index b76561a87c32d27f76a49047bc5a84e94c9d5ebb..91113a8a0af68d0643d97545ae2aa59bdee5e34d 100644 --- a/Assets/Resources/Prefabs/Ray.prefab +++ b/Assets/Resources/Prefabs/Ray.prefab @@ -125,9 +125,6 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: meshRendererToChange: {fileID: 323004521892560777} - animationStartColor: {r: 0.98039216, g: 0.99215686, b: 0.03137255, a: 1} - animationEndColor: {r: 1, g: 0.52156866, b: 0.007843138, a: 1} - animateDuration: 5 --- !u!1 &4853696702160906218 GameObject: m_ObjectHideFlags: 0 @@ -186,7 +183,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 2100000, guid: dc000ff84823e7045bac15e87d6da9b2, type: 2} + - {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 diff --git a/Assets/Scripts/InteractionEngine/Fact.cs b/Assets/Scripts/InteractionEngine/Fact.cs index 5c3816913c2d2e19b8f44bdb1fb6dee5fee8ea81..76b8e463ac19af3741da62a2e383d302fc324b7f 100644 --- a/Assets/Scripts/InteractionEngine/Fact.cs +++ b/Assets/Scripts/InteractionEngine/Fact.cs @@ -34,7 +34,6 @@ public int Id } public GameObject Representation; public string backendURI; - public string backendValueURI; // supposed to be null, for Facts without values eg. Points, OpenLines, OnLineFacts... public string format(float t) { @@ -325,18 +324,24 @@ public RayFact(int pid1, int pid2, string uri) public static RayFact parseFact(Scroll.ScrollFact fact) { String uri = fact.@ref.uri; - String pointAUri = ((OMS)((OMA)((Scroll.ScrollSymbolFact)fact).df).arguments[0]).uri; - String pointBUri = ((OMS)((OMA)((Scroll.ScrollSymbolFact)fact).df).arguments[1]).uri; - if (CommunicationEvents.Facts.Exists(x => x.backendURI.Equals(pointAUri)) && - CommunicationEvents.Facts.Exists(x => x.backendURI.Equals(pointBUri))) + if ((OMA)((Scroll.ScrollSymbolFact)fact).df != null) { - int pid1 = CommunicationEvents.Facts.Find(x => x.backendURI.Equals(pointAUri)).Id; - int pid2 = CommunicationEvents.Facts.Find(x => x.backendURI.Equals(pointBUri)).Id; - return new RayFact(pid1, pid2, uri); + String pointAUri = ((OMS)((OMA)((Scroll.ScrollSymbolFact)fact).df).arguments[0]).uri; + String pointBUri = ((OMS)((OMA)((Scroll.ScrollSymbolFact)fact).df).arguments[1]).uri; + if (CommunicationEvents.Facts.Exists(x => x.backendURI.Equals(pointAUri)) && + CommunicationEvents.Facts.Exists(x => x.backendURI.Equals(pointBUri))) + { + int pid1 = CommunicationEvents.Facts.Find(x => x.backendURI.Equals(pointAUri)).Id; + int pid2 = CommunicationEvents.Facts.Find(x => x.backendURI.Equals(pointBUri)).Id; + return new RayFact(pid1, pid2, uri); + } + //If dependent facts do not exist return null + else + { + return null; + } } - //If dependent facts do not exist return null - else - { + else { return null; } } diff --git a/Assets/Scripts/InventoryStuff/ScrollDetails.cs b/Assets/Scripts/InventoryStuff/ScrollDetails.cs index a2569a9c013f08ece91733e970b3e59d4c48a802..6d45e1066401f6e98052099af26a77e80fded40c 100644 --- a/Assets/Scripts/InventoryStuff/ScrollDetails.cs +++ b/Assets/Scripts/InventoryStuff/ScrollDetails.cs @@ -259,8 +259,9 @@ public void animateHint(GameObject scrollParameter, string scrollParameterUri) { scrollParameter.GetComponentInChildren<ImageHintAnimation>().AnimationTrigger(); //Animate Fact in FactPanel AnimateExistingFactEvent.Invoke(existingFact); - //Animate factRepresentation in game - existingFact.Representation.GetComponentInChildren<MeshRendererHintAnimation>().AnimationTrigger(); + //Animate factRepresentation in game if Fact has a Representation + if(existingFact.Representation != null) + existingFact.Representation.GetComponentInChildren<MeshRendererHintAnimation>().AnimationTrigger(); } //If not -> Generate a Fact-Representation with such dependent facts else