-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of https://fgitea.ddnsto.com/fujisheng/FUIAnalyzer
- Loading branch information
Showing
9 changed files
with
68 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# FUI0001 | ||
|
||
## Target 'xxx' not 'FUI.IElement' | ||
|
||
This error occurs when the target element is not inherited from FUI.IElement. | ||
|
||
```c# | ||
[Binding("txt_test", nameof(UnityEngine.UI.Text.text))] | ||
public string TestString{get; set;} => string.Empty | ||
``` | ||
|
||
The UnityEngine.UI.Text is not inherited from FUI.IElement. | ||
|
||
<span style="color: #e6e6e6;">The following example resolves the error:</span> | ||
|
||
```c# | ||
[Binding("txt_test", nameof(TextElement.Text))] | ||
public string TestString{get; set;} => string.Empty | ||
``` |
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,19 @@ | ||
# FUI0002 | ||
|
||
## Target property 'xxx' not 'FUI.Bindable.BindableProperty<>' | ||
|
||
This error occurs when the target property is not inherited from FUI.Bindable.BindableProperty<T>. | ||
|
||
```c# | ||
[Binding("txt_test", nameof(TextElement.name))] | ||
public string TestString{get; set;} => string.Empty | ||
``` | ||
|
||
The TextElement.name is not inherited from FUI.BindableProperty<T>. | ||
|
||
The following example resolves the error: | ||
|
||
```c# | ||
[Binding("txt_test", nameof(TextElement.Text))] | ||
public string TestString{get; set;} => string.Empty | ||
``` |
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,30 @@ | ||
# FUI0003 | ||
|
||
## Converter 'xxx' not 'FUI.IValueConverter<,>'. | ||
|
||
This error occurs when the ValueConverter is not inherited from FUI.IValueConverter<,>. | ||
|
||
```c# | ||
[Binding("txt_test", nameof(TextElement.Text), typeof(UnityEngine.GameObject))] | ||
public int TestInt{get; set;} => 0 | ||
``` | ||
|
||
The UnityEngine.GameObject is not inherited from FUI.IValueConverter<,>. | ||
|
||
You can use other value converters or inherit custom value converters from FUI.IValueConverter<,>. | ||
|
||
The following example resolves the error: | ||
|
||
```c# | ||
[Binding("txt_test", nameof(TextElement.Text), typeof(IntToStringConverter))] | ||
public int TestInt{get; set;} => 0 | ||
``` | ||
|
||
or | ||
|
||
```c# | ||
public class CustomConverter : FUI.IValueConverter<int, string>{} | ||
|
||
[Binding("txt_test", nameof(TextElement.Text), typeof(CustomConverter))] | ||
public int TestInt{get; set;} => 0 | ||
``` |
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.