Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
U
UFrameIT
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
FrameIT
UFrameIT
Commits
588469d3
Commit
588469d3
authored
1 year ago
by
mariuskern
Browse files
Options
Downloads
Patches
Plain Diff
test scroll added
parent
3113362b
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Assets/Scripts/GlobalBehaviour.cs
+29
-32
29 additions, 32 deletions
Assets/Scripts/GlobalBehaviour.cs
Assets/Scripts/MMTServer/CommunicationProtocoll/MMTConstants.cs
+1
-0
1 addition, 0 deletions
.../Scripts/MMTServer/CommunicationProtocoll/MMTConstants.cs
with
30 additions
and
32 deletions
Assets/Scripts/GlobalBehaviour.cs
+
29
−
32
View file @
588469d3
...
@@ -80,43 +80,40 @@ IEnumerator _GetScrollsfromServer()
...
@@ -80,43 +80,40 @@ IEnumerator _GetScrollsfromServer()
//UnityWebRequest request = UnityWebRequest.Get("https://019a8ea5-843a-498b-8d0c-778669aef987.mock.pstmn.io/get");
//UnityWebRequest request = UnityWebRequest.Get("https://019a8ea5-843a-498b-8d0c-778669aef987.mock.pstmn.io/get");
System
.
DateTime
requestTime
=
System
.
DateTime
.
UtcNow
;
System
.
DateTime
requestTime
=
System
.
DateTime
.
UtcNow
;
//UnityWebRequest request = null;
UnityWebRequest
request
=
null
;
//for (int i = 0; i < this.tryScrollListTimes; i++)
for
(
int
i
=
0
;
i
<
this
.
tryScrollListTimes
;
i
++)
//{
{
// request = UnityWebRequest.Get(CommunicationEvents.ServerAdress + "/scroll/list");
request
=
UnityWebRequest
.
Get
(
CommunicationEvents
.
ServerAdress
+
"/scroll/list"
);
// request.method = UnityWebRequest.kHttpVerbGET;
request
.
method
=
UnityWebRequest
.
kHttpVerbGET
;
yield
return
request
.
SendWebRequest
();
// yield return request.SendWebRequest();
if
(
request
.
result
==
UnityWebRequest
.
Result
.
ConnectionError
||
request
.
result
==
UnityWebRequest
.
Result
.
ProtocolError
)
// if (request.result == UnityWebRequest.Result.ConnectionError
{
// || request.result == UnityWebRequest.Result.ProtocolError)
Debug
.
LogWarning
(
request
.
error
);
// {
Debug
.
Log
(
"GET Scroll/list failed. Attempt: "
+
(
i
+
1
).
ToString
());
// Debug.LogWarning(request.error);
}
// Debug.Log("GET Scroll/list failed. Attempt: " + (i + 1).ToString());
else
// }
break
;
// else
}
// break;
while
(
request
.
result
==
UnityWebRequest
.
Result
.
InProgress
)
//}
yield
return
null
;
//while (request.result == UnityWebRequest.Result.InProgress)
// yield return null;
System
.
DateTime
answerTime
=
System
.
DateTime
.
UtcNow
;
System
.
DateTime
answerTime
=
System
.
DateTime
.
UtcNow
;
string
jsonString
=
null
;
string
jsonString
=
null
;
//if (request.result == UnityWebRequest.Result.ConnectionError
if
(
request
.
result
==
UnityWebRequest
.
Result
.
ConnectionError
// || request.result == UnityWebRequest.Result.ProtocolError)
||
request
.
result
==
UnityWebRequest
.
Result
.
ProtocolError
)
//{
{
// Debug.LogWarning(request.error);
Debug
.
LogWarning
(
request
.
error
);
//}
}
//else
else
//{
{
// CommunicationEvents.ServerRunning = true;
CommunicationEvents
.
ServerRunning
=
true
;
while
(!
request
.
downloadHandler
.
isDone
)
// while (!request.downloadHandler.isDone)
yield
return
null
;
// yield return null;
jsonString
=
request
.
downloadHandler
.
text
;
// jsonString = request.downloadHandler.text;
}
//}
if
(
string
.
IsNullOrEmpty
(
jsonString
)
if
(
string
.
IsNullOrEmpty
(
jsonString
)
||
jsonString
.
Equals
(
"[]"
))
||
jsonString
.
Equals
(
"[]"
))
...
...
This diff is collapsed.
Click to expand it.
Assets/Scripts/MMTServer/CommunicationProtocoll/MMTConstants.cs
+
1
−
0
View file @
588469d3
...
@@ -122,6 +122,7 @@ public static class MMTConstants
...
@@ -122,6 +122,7 @@ public static class MMTConstants
public
const
string
ScrollCylinderVolumeScroll
=
"http://mathhub.info/FrameIT/frameworld?CylinderVolumeScroll"
;
public
const
string
ScrollCylinderVolumeScroll
=
"http://mathhub.info/FrameIT/frameworld?CylinderVolumeScroll"
;
public
const
string
ScrollCircleLineAngleToAngleScroll
=
"http://mathhub.info/FrameIT/frameworld?CircleLineAngleToAngleScroll"
;
public
const
string
ScrollCircleLineAngleToAngleScroll
=
"http://mathhub.info/FrameIT/frameworld?CircleLineAngleToAngleScroll"
;
public
const
string
ScrollMidpoint
=
"http://mathhub.info/FrameIT/frameworld?Midpoint"
;
public
const
string
ScrollMidpoint
=
"http://mathhub.info/FrameIT/frameworld?Midpoint"
;
public
const
string
ScrollTest
=
"http://mathhub.info/FrameIT/frameworld?Test"
;
public
const
string
ScrollCircleScroll
=
"http://mathhub.info/FrameIT/frameworld?CircleScroll"
;
public
const
string
ScrollCircleScroll
=
"http://mathhub.info/FrameIT/frameworld?CircleScroll"
;
public
const
string
ScrollCircleLineAngleScroll
=
"http://mathhub.info/FrameIT/frameworld?CircleLineAngleScroll"
;
public
const
string
ScrollCircleLineAngleScroll
=
"http://mathhub.info/FrameIT/frameworld?CircleLineAngleScroll"
;
public
const
string
ScrollCircleAreaScroll
=
"http://mathhub.info/FrameIT/frameworld?CircleAreaScroll"
;
public
const
string
ScrollCircleAreaScroll
=
"http://mathhub.info/FrameIT/frameworld?CircleAreaScroll"
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment