Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
trees
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
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
WANDER
trees
Commits
23f7bafb
Commit
23f7bafb
authored
2 years ago
by
Knuiman, Bart
Browse files
Options
Downloads
Patches
Plain Diff
Bomocacher
parent
7e542b28
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Runtime/TreeCacher.cs
+18
-4
18 additions, 4 deletions
Runtime/TreeCacher.cs
Runtime/TreeCacher.prefab
+2
-2
2 additions, 2 deletions
Runtime/TreeCacher.prefab
with
20 additions
and
6 deletions
Runtime/TreeCacher.cs
+
18
−
4
View file @
23f7bafb
...
@@ -55,6 +55,19 @@ namespace Wander
...
@@ -55,6 +55,19 @@ namespace Wander
activeRequests
=
new
List
<
TreeImageTile
>();
activeRequests
=
new
List
<
TreeImageTile
>();
}
}
internal
void
Delete2KBFiles
()
{
if
(
string
.
IsNullOrWhiteSpace
(
folder
))
return
;
var
enumerator
=
Directory
.
EnumerateFiles
(
folder
);
foreach
(
var
d
in
enumerator
)
{
FileInfo
fi
=
new
FileInfo
(
d
);
if
(
fi
.
Length
<
2300
)
File
.
Delete
(
d
);
}
}
internal
void
Cache
()
internal
void
Cache
()
{
{
if
(
string
.
IsNullOrWhiteSpace
(
folder
))
if
(
string
.
IsNullOrWhiteSpace
(
folder
))
...
@@ -69,10 +82,6 @@ namespace Wander
...
@@ -69,10 +82,6 @@ namespace Wander
void
CreatePreliminaries
()
void
CreatePreliminaries
()
{
{
if
(!
Directory
.
Exists
(
folder
.
Combine
(
"Trees"
).
NormalizePath
()))
{
Directory
.
CreateDirectory
(
folder
.
Combine
(
"Trees"
).
NormalizePath
()
);
}
treeRequests
=
new
List
<
TreeImageTile
>();
treeRequests
=
new
List
<
TreeImageTile
>();
}
}
...
@@ -227,6 +236,11 @@ namespace Wander
...
@@ -227,6 +236,11 @@ namespace Wander
{
{
cacher
.
Cleanup
();
cacher
.
Cleanup
();
}
}
if
(
GUILayout
.
Button
(
"Delete 2KB files"
))
{
cacher
.
Delete2KBFiles
();
}
}
}
GUILayout
.
EndHorizontal
();
GUILayout
.
EndHorizontal
();
...
...
This diff is collapsed.
Click to expand it.
Runtime/TreeCacher.prefab
+
2
−
2
View file @
23f7bafb
...
@@ -45,7 +45,7 @@ MonoBehaviour:
...
@@ -45,7 +45,7 @@ MonoBehaviour:
m_Name
:
m_Name
:
m_EditorClassIdentifier
:
m_EditorClassIdentifier
:
state
:
0
state
:
0
folder
:
folder
:
C:/Data sets/Trees
numActiveDownloads
:
4
numActiveDownloads
:
4
numImages
:
0
numImages
:
0
numImagesFinished
:
0
numImagesFinished
:
0
...
@@ -55,4 +55,4 @@ MonoBehaviour:
...
@@ -55,4 +55,4 @@ MonoBehaviour:
lon
:
5.636028
lon
:
5.636028
zoom
:
14
zoom
:
14
numSimultanousDownloads
:
4
numSimultanousDownloads
:
4
numTiles
:
16384
numTiles
:
500
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