mirror of
https://github.com/DCFApixels/Unity-DebugX.git
synced 2025-09-18 01:54:37 +08:00
refactor: using camera that was given in params.
This commit is contained in:
parent
4bf61527a5
commit
37aab9ca44
@ -61,7 +61,7 @@ namespace DCFApixels {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Should be called once after the app domain is cleared.
|
||||
/// Texture should be set once after the app domain is cleared.
|
||||
/// </summary>
|
||||
private void CheckTextureInstance() {
|
||||
if (_backgroundTexture != null) {
|
||||
@ -141,9 +141,8 @@ namespace DCFApixels {
|
||||
float GetCameraZoom() {
|
||||
const float DEFAULT_ZOOM = 1f;
|
||||
|
||||
var localCamera = GetCurrentCamera();
|
||||
if (localCamera != null) {
|
||||
return localCamera.orthographicSize;
|
||||
if (camera != null) {
|
||||
return camera.orthographicSize;
|
||||
}
|
||||
|
||||
var currentDrawingSceneView = SceneView.currentDrawingSceneView;
|
||||
@ -152,7 +151,7 @@ namespace DCFApixels {
|
||||
return DEFAULT_ZOOM;
|
||||
}
|
||||
|
||||
localCamera = currentDrawingSceneView.camera;
|
||||
var localCamera = currentDrawingSceneView.camera;
|
||||
|
||||
if (localCamera != null) {
|
||||
return localCamera.orthographicSize;
|
||||
|
Loading…
Reference in New Issue
Block a user