modify access rights.
This commit is contained in:
@@ -5,8 +5,7 @@ using MeshForwardDirection = uDesktopDuplication.Texture.MeshForwardDirection;
|
|||||||
public class MultipleMonitorCreator : MonoBehaviour
|
public class MultipleMonitorCreator : MonoBehaviour
|
||||||
{
|
{
|
||||||
[Tooltip("Create monitors using this prefab.")]
|
[Tooltip("Create monitors using this prefab.")]
|
||||||
[SerializeField]
|
public GameObject monitorPrefab;
|
||||||
GameObject monitorPrefab;
|
|
||||||
|
|
||||||
public enum ScaleMode
|
public enum ScaleMode
|
||||||
{
|
{
|
||||||
@@ -16,29 +15,24 @@ public class MultipleMonitorCreator : MonoBehaviour
|
|||||||
}
|
}
|
||||||
|
|
||||||
[Tooltip("Real: DPI-based real scale \nFixed: Same width \nPixel: bigger if screen resolution is high.")]
|
[Tooltip("Real: DPI-based real scale \nFixed: Same width \nPixel: bigger if screen resolution is high.")]
|
||||||
[SerializeField]
|
public ScaleMode scaleMode = ScaleMode.Fixed;
|
||||||
ScaleMode scaleMode = ScaleMode.Fixed;
|
|
||||||
|
|
||||||
[Tooltip("Use this scale as width if scaleMode is Fixed.")]
|
[Tooltip("Use this scale as width if scaleMode is Fixed.")]
|
||||||
[SerializeField]
|
public float scale = 0.5f;
|
||||||
float scale = 0.5f;
|
|
||||||
|
|
||||||
[Tooltip("Please specify the surface direction of the mesh (e.g. Plane => Y.)")]
|
[Tooltip("Please specify the surface direction of the mesh (e.g. Plane => Y.)")]
|
||||||
public MeshForwardDirection meshForwardDirection = MeshForwardDirection.Z;
|
public MeshForwardDirection meshForwardDirection = MeshForwardDirection.Z;
|
||||||
|
|
||||||
[Tooltip("Remove unsupported monitors automatically after removeWaitDuration.")]
|
[Tooltip("Remove unsupported monitors automatically after removeWaitDuration.")]
|
||||||
[SerializeField]
|
public bool removeIfUnsupported = true;
|
||||||
bool removeIfUnsupported = true;
|
|
||||||
|
|
||||||
[Tooltip("Remove unsupported monitors automatically after removeWaitDuration.")]
|
[Tooltip("Remove unsupported monitors automatically after removeWaitDuration.")]
|
||||||
[SerializeField]
|
public float removeWaitDuration = 5f;
|
||||||
float removeWaitDuration = 5f;
|
|
||||||
|
|
||||||
[Tooltip("Remove all childrens (for debug).")]
|
[Tooltip("Remove all childrens (for debug).")]
|
||||||
[SerializeField]
|
public bool removeChildrenWhenClear = true;
|
||||||
bool removeChildrenWhenClear = true;
|
|
||||||
|
|
||||||
bool hasMonitorUnsupportStateChecked = false;
|
bool hasMonitorUnsupportStateChecked_ = false;
|
||||||
float removeWaitTimer_ = 0f;
|
float removeWaitTimer_ = 0f;
|
||||||
|
|
||||||
public class MonitorInfo
|
public class MonitorInfo
|
||||||
@@ -81,10 +75,10 @@ public class MultipleMonitorCreator : MonoBehaviour
|
|||||||
|
|
||||||
void RemoveUnsupportedDisplayAfterRemoveTimer()
|
void RemoveUnsupportedDisplayAfterRemoveTimer()
|
||||||
{
|
{
|
||||||
if (!hasMonitorUnsupportStateChecked) {
|
if (!hasMonitorUnsupportStateChecked_) {
|
||||||
removeWaitTimer_ += Time.deltaTime;
|
removeWaitTimer_ += Time.deltaTime;
|
||||||
if (removeWaitTimer_ > removeWaitDuration) {
|
if (removeWaitTimer_ > removeWaitDuration) {
|
||||||
hasMonitorUnsupportStateChecked = true;
|
hasMonitorUnsupportStateChecked_ = true;
|
||||||
foreach (var info in monitors_) {
|
foreach (var info in monitors_) {
|
||||||
if (info.uddTexture.monitor.state == uDesktopDuplication.MonitorState.Unsupported) {
|
if (info.uddTexture.monitor.state == uDesktopDuplication.MonitorState.Unsupported) {
|
||||||
Destroy(info.gameObject);
|
Destroy(info.gameObject);
|
||||||
@@ -97,7 +91,7 @@ public class MultipleMonitorCreator : MonoBehaviour
|
|||||||
|
|
||||||
void ResetRemoveTimer()
|
void ResetRemoveTimer()
|
||||||
{
|
{
|
||||||
hasMonitorUnsupportStateChecked = false;
|
hasMonitorUnsupportStateChecked_ = false;
|
||||||
removeWaitTimer_ = 0f;
|
removeWaitTimer_ = 0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
|
|
||||||
public class MultipleMonitorRoundLayouter : MultipleMonitorLayouter
|
public class MultipleMonitorRoundLayouter : MultipleMonitorLayouter
|
||||||
{
|
{
|
||||||
[SerializeField] float radius = 10f;
|
public float radius = 10f;
|
||||||
[SerializeField] Vector3 offsetAngle = Vector3.zero;
|
public Vector3 offsetAngle = Vector3.zero;
|
||||||
|
|
||||||
void OnDisable()
|
void OnDisable()
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user