Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Tommé Nöll
seedling
Commits
6ac7c452
Commit
6ac7c452
authored
Jul 06, 2019
by
Tommé Nöll
Browse files
Merge branch 'tomme'
parents
8c4bd5d5
3e745c00
Changes
2
Hide whitespace changes
Inline
Side-by-side
Assets/Editor/NotifyForLockedFiles.cs
View file @
6ac7c452
...
...
@@ -9,8 +9,13 @@ using System.IO;
[
InitializeOnLoad
]
public
class
NotifyForLockedFiles
:
UnityEditor
.
AssetModificationProcessor
{
private
static
Scene
realOldScene
;
private
static
bool
justActivated
=
true
;
private
static
bool
justReloaded
=
true
;
static
NotifyForLockedFiles
()
{
//Debug.Log("Activate");
EditorSceneManager
.
activeSceneChangedInEditMode
+=
CheckActivatedScene
;
if
(
EditorSceneManager
.
GetActiveScene
()
!=
null
)
{
...
...
@@ -39,6 +44,25 @@ public class NotifyForLockedFiles : UnityEditor.AssetModificationProcessor
public
static
void
CheckActivatedScene
(
Scene
oldScene
,
Scene
newScene
)
{
bool
wasJustActivated
=
justActivated
;
bool
wasJustReloaded
=
justReloaded
;
//Debug.Log(oldScene.path + ", " + realOldScene.path + ", " + newScene.path + ", " + justActivated + ", " + justReloaded);
if
(
newScene
.
path
!=
null
&&
newScene
.
path
.
Length
>
5
)
justActivated
=
false
;
if
(
oldScene
.
path
==
null
||
oldScene
.
path
.
Length
<
5
)
justReloaded
=
false
;
if
(
oldScene
==
newScene
)
return
;
if
(
wasJustActivated
)
{
//Debug.Log("Starting Unity");
}
if
(
wasJustReloaded
)
{
//Debug.Log("Reloading Level");
return
;
}
//if (oldScene.path == null || oldScene.path.Length < 5) return;
realOldScene
=
newScene
;
FileInfo
info
=
new
FileInfo
(
newScene
.
path
);
if
(
info
.
IsReadOnly
)
{
...
...
Assets/Scripts/Audio/VariableSoundPlayer.cs
View file @
6ac7c452
...
...
@@ -67,7 +67,6 @@ public class VariableSoundPlayer : MonoBehaviour
{
if
(
activate
)
{
Debug
.
Log
(
i
+
", iCurrent: "
+
iCurrent
);
if
(
iCurrent
!=
i
)
{
audioSource
.
clip
=
soundObjects
[
i
].
clip
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment