Skip to content

Fix issues #48, #24, #19 - #54

Open
digi2303 wants to merge 1 commit into
BeneathTheWaves:masterfrom
digi2303:fix/issues-48-24-19
Open

digi2303 wants to merge 1 commit into
BeneathTheWaves:masterfrom
digi2303:fix/issues-48-24-19

Conversation

@digi2303

Copy link
Copy Markdown
Contributor

Three small self-contained bug fixes. Closes #48, #24, #19.

{
exportPath = StandaloneFileBrowser.StandaloneFileBrowser.SaveFilePanel("Save patch as...", Application.dataPath, "TerrainPatch", "optoctreepatch");
if (string.IsNullOrEmpty(exportPath)) return;
if (!exportPath.EndsWith(".optoctreepatch")) exportPath += ".optoctreepatch";

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This wont fix the issue with #19. issue #19 is that the file browser window on Linux for some reason cannot automatically fill in this extension. Its also an issue with imports being unable to sort by file type :/

The only way to fix this is within the unmanaged C++ library of UnityStandaloneFileBrowser, which i have zero knowledge to fix

Tho this is good error checking and is not a terrible bandaid solution given the situation, just prob not the ideal way to fix it

string combinedString = (materialNameRequest.asset as TextAsset).text;

string[] lines = combinedString.Split(new[] {Environment.NewLine}, StringSplitOptions.None);
string[] lines = combinedString.Replace("\r\n", "\n").Split('\n');

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this actually works it will save me SO much time. It feels like it shouldn't work tho given that Enviroment.NewLine should account for platform differences at runtime.

If you can test this and it does work then I will be amazed


//Apply
transform.rotation = horiz * rotation * vert;
transform.rotation = Quaternion.Euler(pitch, yaw, 0f);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if this is tested and the camera feels roughly (or exactly) the same, then lgtm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix Upside-Down Inverted Horizontal Camera Rotation

2 participants