Fix crash on login/logout?
This commit is contained in:
@@ -138,7 +138,7 @@ public class TemplateEditorManager : IDisposable
|
||||
};
|
||||
|
||||
if (!Character.IsValid) //safeguard
|
||||
ChangeEditorCharacterInternal(_gameObjectService.GetCurrentPlayerActorIdentifier()); //will set EditorProfile.Character
|
||||
ChangeEditorCharacterInternal(_gameObjectService.GetCurrentPlayerActorIdentifier().CreatePermanent()); //will set EditorProfile.Character
|
||||
|
||||
EditorProfile.Templates.Clear(); //safeguard
|
||||
EditorProfile.Templates.Add(CurrentlyEditedTemplate);
|
||||
@@ -335,6 +335,8 @@ public class TemplateEditorManager : IDisposable
|
||||
return;
|
||||
}
|
||||
|
||||
localPlayer = localPlayer.CreatePermanent();
|
||||
|
||||
if (_configuration.EditorConfiguration.PreviewCharacter != localPlayer)
|
||||
{
|
||||
_logger.Debug("Resetting editor character because automatic condition triggered in OnLogin");
|
||||
|
||||
Reference in New Issue
Block a user