Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Code and Fixed Some Warning ⚠ #10526

Merged
merged 20 commits into from
Jun 21, 2022
Merged
Show file tree
Hide file tree
Changes from 14 commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
9024d40
Update Code And Fixed Some Warning ⚠
BillyFrcs Apr 5, 2022
efb035b
Revert switch target result.
BillyFrcs Apr 6, 2022
b513e37
Update Tracking Object
BillyFrcs Apr 28, 2022
31004f2
Merge branch 'microsoft:main' into UpdateCode-And-FixWarning
BillyFrcs Apr 28, 2022
5a71231
Merge branch 'microsoft:main' into UpdateCode-And-FixWarning
BillyFrcs Apr 28, 2022
3fd1940
Merge branch 'microsoft:main' into UpdateCode-And-FixWarning
BillyFrcs May 1, 2022
23b401b
Merge branch 'microsoft:main' into UpdateCode-And-FixWarning
BillyFrcs May 9, 2022
ab83fed
Revert SetCursor() Method to avoid breaking API
BillyFrcs May 20, 2022
e98c671
Merge branch 'microsoft:main' into UpdateCode-And-FixWarning
BillyFrcs May 20, 2022
100e893
Merge branch 'microsoft:main' into UpdateCode-And-FixWarning
BillyFrcs May 24, 2022
eef926e
Revert private/protected fields to public
BillyFrcs May 24, 2022
40fd6ea
Merge branch 'prerelease/2.8.0' into UpdateCode-And-FixWarning
BillyFrcs May 24, 2022
0da0cb3
Fix SetCursor()
BillyFrcs May 25, 2022
9224c98
Update Assets/MRTK/SDK/Features/UX/Scripts/Pointers/ShellHandRayPoint…
BillyFrcs May 25, 2022
0a267e7
Update TeleportPointer.cs
BillyFrcs May 26, 2022
c3c7547
Merge branch 'main' into UpdateCode-And-FixWarning
BillyFrcs May 28, 2022
3374386
Merge branch 'microsoft:main' into UpdateCode-And-FixWarning
BillyFrcs Jun 15, 2022
def8aa4
Merge branch 'microsoft:main' into UpdateCode-And-FixWarning
BillyFrcs Jun 18, 2022
fb7d001
Merge branch 'microsoft:main' into UpdateCode-And-FixWarning
BillyFrcs Jun 20, 2022
e583c20
Update LoaderController.cs
BillyFrcs Jun 20, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ public override void Enable()
EnableIfLoaderBecomesActive();
return;
}
else if (!IsActiveLoader.Value)

if (!IsActiveLoader.Value)
{
IsEnabled = false;
return;
Expand All @@ -96,7 +97,7 @@ public override void Enable()
private async void EnableIfLoaderBecomesActive()
{
await new WaitUntil(() => IsActiveLoader.HasValue);
if (IsActiveLoader.Value)
if (IsActiveLoader != null && IsActiveLoader.Value)
Copy link
Contributor

Choose a reason for hiding this comment

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

@keveleigh is the != null check necessary here?

Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't be, since we do it after we call IsActiveLoader.HasValue without a null check in the previous line.

{
Enable();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,4 +201,4 @@ private IEnumerator RotateHintSequence()
}
}
}
}
}
10 changes: 2 additions & 8 deletions Assets/MRTK/SDK/Features/UX/Scripts/Loader/LoaderController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -196,10 +196,8 @@ private float Cycles
{
return (frequency < 0.0f) ? (Time.time / 0.000001f) * -1.0f : (Time.time / frequency) * -1.0f;
}
else
{
return (frequency < 0.0f) ? Time.time / 0.000001f : Time.time / frequency;
}

return (frequency < 0.0f) ? Time.time / 0.000001f : Time.time / frequency;
RogPodge marked this conversation as resolved.
Show resolved Hide resolved
}
}

Expand All @@ -209,13 +207,9 @@ private float Cycles

private Transform dot01;
private Vector3 dot01NewPos = Vector3.zero;
private Vector3 dot01NewScale = Vector3.zero;
private Vector3 dot01NewRot = Vector3.zero;

private Transform dot02;
private Vector3 dot02NewPos = Vector3.zero;
private Vector3 dot02NewScale = Vector3.zero;
private Vector3 dot02NewRot = Vector3.zero;

private const float tau = Mathf.PI * 2.0f;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public abstract class BaseControllerPointer : ControllerPoseSynchronizer, IMixed
/// </summary>
/// <remarks>This <see href="https://docs.unity3d.com/ScriptReference/GameObject.html">GameObject</see> must have a <see cref="Microsoft.MixedReality.Toolkit.Input.IMixedRealityCursor"/> attached to it.</remarks>
/// <param name="newCursor">The new cursor</param>
public virtual void SetCursor(GameObject newCursor = null)
RogPodge marked this conversation as resolved.
Show resolved Hide resolved
public virtual SetCursor(GameObject newCursor = null)
{
using (SetCursorPerfMarker.Auto())
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,15 @@ public override void OnPostSceneQuery()
wasGrabPressed = IsGrabPressed;

var currentMaterial = IsSelectPressed || IsGrabPressed ? lineMaterialSelected : lineMaterialNoTarget;

for (int i = 0; i < LineRenderers.Length; i++)
BillyFrcs marked this conversation as resolved.
Show resolved Hide resolved
foreach (var lr in LineRenderers)
{
var lineRenderer = LineRenderers[i] as MixedRealityLineRenderer;
lineRenderer.LineMaterial = currentMaterial;
var lineRenderer = lr as MixedRealityLineRenderer;

if (lineRenderer != null)
{
lineRenderer.LineMaterial = currentMaterial;
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ protected override async void Start()
}
}
lateRegisterTeleport = false;
CoreServices.TeleportSystem.RegisterHandler<IMixedRealityTeleportHandler>(this);
CoreServices.TeleportSystem?.RegisterHandler<IMixedRealityTeleportHandler>(this);
}
}

Expand All @@ -245,15 +245,15 @@ protected override void OnDisable()

private Vector2 currentInputPosition = Vector2.zero;

protected bool isTeleportRequestActive = false;
private bool isTeleportRequestActive = false;

private bool lateRegisterTeleport = true;

private bool canTeleport = false;

private bool canMove = false;

protected Gradient GetLineGradient(TeleportSurfaceResult targetResult)
private Gradient GetLineGradient(TeleportSurfaceResult targetResult)
RogPodge marked this conversation as resolved.
Show resolved Hide resolved
{
switch (targetResult)
{
Expand Down
41 changes: 41 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<!-- BEGIN MICROSOFT SECURITY.MD V0.0.7 BLOCK -->
RogPodge marked this conversation as resolved.
Show resolved Hide resolved

## Security

Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/Microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet), [Xamarin](https://github.com/xamarin), and [our GitHub organizations](https://opensource.microsoft.com/).

If you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](https://aka.ms/opensource/security/definition), please report it to us as described below.

## Reporting Security Issues

**Please do not report security vulnerabilities through public GitHub issues.**

Instead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://aka.ms/opensource/security/create-report).

If you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com). If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://aka.ms/opensource/security/pgpkey).

You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://aka.ms/opensource/security/msrc).

Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue:

* Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.)
* Full paths of source file(s) related to the manifestation of the issue
* The location of the affected source code (tag/branch/commit or direct URL)
* Any special configuration required to reproduce the issue
* Step-by-step instructions to reproduce the issue
* Proof-of-concept or exploit code (if possible)
* Impact of the issue, including how an attacker might exploit the issue

This information will help us triage your report more quickly.

If you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our [Microsoft Bug Bounty Program](https://aka.ms/opensource/security/bounty) page for more details about our active programs.

## Preferred Languages

We prefer all communications to be in English.

## Policy

Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://aka.ms/opensource/security/cvd).

<!-- END MICROSOFT SECURITY.MD BLOCK -->