-
Notifications
You must be signed in to change notification settings - Fork 98
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ARCore Extensions for AR Foundation v1.21.0
- Loading branch information
Showing
40 changed files
with
850 additions
and
314 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<dependencies> | ||
<iosPods> | ||
<iosPod name="ARCore/CloudAnchors" version="~> 1.20.0" minTargetSdk="11.0"> | ||
<iosPod name="ARCore/CloudAnchors" version="~> 1.21.0" minTargetSdk="11.0"> | ||
</iosPod> | ||
</iosPods> | ||
</dependencies> |
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 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
54 changes: 54 additions & 0 deletions
54
Editor/Scripts/Internal/PropertyDrawers/DynamicHelpAttributeDrawer.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,54 @@ | ||
//----------------------------------------------------------------------- | ||
// <copyright file="DynamicHelpAttributeDrawer.cs" company="Google LLC"> | ||
// | ||
// Copyright 2020 Google LLC | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
// | ||
// </copyright> | ||
//----------------------------------------------------------------------- | ||
|
||
namespace Google.XR.ARCoreExtensions.Editor.Internal | ||
{ | ||
using System; | ||
using System.Reflection; | ||
using Google.XR.ARCoreExtensions.Internal; | ||
using UnityEditor; | ||
|
||
/// <summary> | ||
/// DynamicHelpAttributeHelpAttribute drawer that draws a HelpBox below the property to | ||
/// display the help content based on the given condition. | ||
/// </summary> | ||
[CustomPropertyDrawer(typeof(DynamicHelpAttribute))] | ||
public class DynamicHelpAttributeDrawer : HelpAttributeDrawer | ||
{ | ||
/// <summary> | ||
/// Get the underlying <see cref="HelpAttribute"/> of this drawer. | ||
/// </summary> | ||
/// <param name="property">The target SerializedProperty.</param> | ||
/// <returns>The HelpAttribute of the given property. It could be null based on | ||
/// the condition function.</returns> | ||
protected override HelpAttribute GetHelpAttribute(SerializedProperty property) | ||
{ | ||
DynamicHelpAttribute dynamicHelpAttribute = attribute as DynamicHelpAttribute; | ||
Type targetType = property.serializedObject.targetObject.GetType(); | ||
MethodInfo checkingFunction = | ||
targetType.GetMethod(dynamicHelpAttribute.CheckingFunction); | ||
HelpAttribute helpAttribute = (HelpAttribute)checkingFunction.Invoke( | ||
property.serializedObject.targetObject, | ||
new object[] { }); | ||
|
||
return helpAttribute; | ||
} | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
...ARCoreHandles/ARSessionExtensions.cs.meta → ...rawers/DynamicHelpAttributeDrawer.cs.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.