-
-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added fov control, added scale use or assume mode for loaded objects
- Loading branch information
Showing
24 changed files
with
3,403 additions
and
4,142 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
.../Packages/com.basis.framework/SettingsManagerModules/Basis Modules/SMModuleFOVSettings.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
using Basis.Scripts.Device_Management; | ||
using Basis.Scripts.Drivers; | ||
using BattlePhaze.SettingsManager; | ||
|
||
public class SMModuleFOVSettings : SettingsManagerOption | ||
{ | ||
public void Awake() | ||
{ | ||
BasisLocalCameraDriver.InstanceExists += InstanceExists; | ||
if(BasisLocalCameraDriver.Instance != null) | ||
{ | ||
InstanceExists(); | ||
} | ||
} | ||
public void OnDestroy() | ||
{ | ||
BasisLocalCameraDriver.InstanceExists -= InstanceExists; | ||
} | ||
private void InstanceExists() | ||
{ | ||
if (BasisDeviceManagement.IsUserInDesktop()) | ||
{ | ||
BasisLocalCameraDriver.Instance.Camera.fieldOfView = SelectedFOV; | ||
} | ||
} | ||
public float SelectedFOV = 60; | ||
public override void ReceiveOption(SettingsMenuInput Option, SettingsManager Manager) | ||
{ | ||
if (NameReturn(0, Option)) | ||
{ | ||
if (SliderReadOption(Option, Manager, out SelectedFOV)) | ||
{ | ||
if (BasisLocalCameraDriver.Instance != null) | ||
{ | ||
InstanceExists(); | ||
} | ||
} | ||
} | ||
} | ||
} |
2 changes: 2 additions & 0 deletions
2
...ages/com.basis.framework/SettingsManagerModules/Basis Modules/SMModuleFOVSettings.cs.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.